In Linux, modify the SSH remote logon Port 1 and the SSH remote logon Port 1211 # vi/etc/ssh/sshd_config Port 1211 # Change '# Port 22' to 'port 1211 '; # AddressFamilyany # ListenAddress0.0.0.0 # ListenAddress: # servicesshd restart # restart the SSH service. 2. Add ports to the firewall. By default, only some ports are enabled in iptables, to use an additional port such as '200', you need to add a whitelist in iptables # iptables-I INPUT-p tcp -- dport 1211-j ACCEPT # service iptables save the First Command takes effect immediately, but it will invalid, therefore, you need to save the command to the iptables configuration file. Path:/etc/sysconfig/iptables. 3. Add security enhancement first. Add a user with normal permissions and set the password: # useradd xiaozui # passwd woiit.net server prohibit ROOT remote login: # vi/etc/ssh/sshd_config # restart # PermitRootLoginno # Change 'permitrootloiny' to 'permitrootlogin no' # modify # MaxAuthTries6 # MaxSessions10 # servicesshd restart # restart the SSH service; remote Management logs on with xiaozui, a common user, and switches to the root user with suroot to obtain the highest permissions.