First, use the command to detect whether the SSH service has been installed on the Linux system: (Command:rpm-qa |grep ssh)
If you do not have an SSH package installed, you can install it via the Yum or RPM installation package (command:yum install ssh)
Third, after the installation is complete, start the SSH service (command:service sshd start or/etc/init.d/sshd start)
Iv. viewing and editing the SSH service configuration file (command:vi/etc/ssh/sshd_config)
V. Modify its default port number to 10022
Use the VI command to enter the editing state on the keyboard "I", find "#port 22" This line, the previous "#" removed, and the port 22 is modified to 10022; Press "ESC" key to exit the editing state, while holding down the "shift+:" Key, enter "Wq" Save exit! Of course, after modifying the configuration file, you need to restart the SSH service!
Vi. Changing the firewall configuration
After performing the above steps, it is found that using port 10022 is not connected to Linux, this is because the Linux firewall is mischief, so we need to open 10022 port!
1. Use the command to view firewall configuration information (command:service iptables status)
See, I've opened up Port 10022! The specific Open command is: (iptables-i input-p tcp--dport 10022-j ACCEPT use service iptables Save configuration, restart the firewall! )
Installing and configuring SSH services under Linux