In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
What is the method for a CVM to modify a remote port? After purchasing a CVM, many webmasters modify the default remote port of the CVM for security reasons. Here we take CentOS 6.8 as an example to describe how to modify the default remote connection port of Linux CVM.
1. Remotely connect and log in to the Linux CVM, and run the vim / etc/ssh/sshd_config command
2. Press the I key on the keyboard to enter the editing state. Modify port 22 to target port. Take port 1022 as an example, enter Port 1022 under Port 22.
3. Press ESC on the keyboard and enter: wq to exit the editing state. Execute the command to restart, and then you can log in to the Linux CVM through port 22 and port 1022 SSH.
4. Configure the firewall. When using the previous version of CentOS 7 to enable the default firewall iptables, you should note that iptables does not block access by default. If the iptables rule is configured, you need to execute iptables-An INPUT-p tcp-dport 1022-j ACCEPT to configure the firewall. Then execute service iptables restart to restart the firewall. (selective operation according to one's own actual situation)
5. Log in to the CVM management console, locate the CVM, select Management, and go to the details page. Select the security group, on the security group list page, find the appropriate security group, and click configure rules.
6. On the Security Group rules page, click add Security Group rules. Security rules are defined according to the actual usage scenario, allowing newly configured remote ports to connect.
7. Use the SSH tool to connect the new port to test whether it is successful or not. Enter the newly modified port number in the Port column when logging in, which in this case is 1022
8. After connecting successfully using port 1022, run the vim / etc/ssh/sshd_config command again to delete Port 22.
9. Run the / etc/init.d/sshd restart command to restart the host, and the remote port modification of the server is completed by default. Log in with the new port number when you log in again.
The above is an introduction to how to modify the remote port of a CVM. The CVM is easy to operate, efficient and easy to use, and is equipped with a website management assistant, which is especially suitable for webmasters who rent CVMs.
As a senior professional cloud computing service provider and cloud security service provider in the industry, it is committed to providing cloud servers for Internet enterprise users and enterprise users in traditional industries. Its products have the characteristics and advantages of "security and stability, easy to use, high service availability, high performance-to-price ratio" and are designed to be customized for enterprises to meet the needs of rich and diversified application scenarios.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.