Note: The default port of SSH is 22, so if PuTTY wants to establish a secure SSH connection, two tasks must be completed.
1, check whether the Linux server opens port 22, and if not, open it; ?
Second, use the PuTTY tool to establish a connection locally.
First, check whether the Linux system opens port 22.
Log in to the Linux system as root user, and use the command "service iptables status" to check whether the port is open. If the text marked in the figure appears, it means that port 22 is open.
If not, use the command "vi /etc/sysconfig/iptables" to edit the configuration file, add the text marked in the figure, and then save and exit.
Use the command "service iptables restart" to restart the service and make the firewall policy take effect.
Second, use the PuTTY tool to establish a connection locally.
Open the downloaded PuTTY tool, enter the host name (IP address) and port number, select SSH, and click Open to establish a connection. What Bian Xiao wants to explain here is that the default port number is 22. If this item is changed, the Linux system side must also use the above method to open the corresponding port, otherwise the connection cannot be established.
There will be a warning message when logging in for the first time. Don't worry, this is because the key has not been added to the cache. Just click "Yes".
After entering the login interface, you can manage the Linux system as if you were operating directly on the server by entering the user name and password.
I hope my answer can help you. Thank you. Remember to adopt.