SSH service configuration file editing
Sshd_config configuration file editing SSH service, change the port of SSH and root privileges.
Use the command in alphabetical :( i to enter edit mode, press ESC to exit edit mode,: wq save and exit).
root@Jaking:~# vim /etc/ssh/sshd_config
1. Open the remote port
找到 # port 22 所在的这一行,复制该行内容并修改。
将 #port 22 修改为 port 22(将前面的 # 去掉)。
该行内容为设置SSHD服务的端口号
2. To allow remote root login
找到 #PermitRootLogin prohibit-password 这一行,复制该行内容并修改。
将 #PermitRootLogin prohibit-password 修改为 PermitRootLogin yes
3. Restart the ssh service
service sshd restart 或者 /etc/init.d/ssh restart