As we all know, ssh default port number is 22, to change the port number is 9688, you need to edit / etc / ssh / ssh_config and / etc / ssh / sshd_config file to two;
Prohibit root remote login, you need to edit / etc / ssh / sshd_config. (May be part of the Linux directory is / etc / sshd, modify according to actual situation)
Follow these steps:
1, edit / etc / ssh / ssh_config file:
[Root@abctest ~] # cat / etc / ssh / ssh_config | grep Port
Port 22 will be commented out before the comment symbol "#" is removed, and the 22 of 9688 to above, save and exit.
2, edit / etc / ssh / sshd_config file:
#vim / etc / ssh / sshd_config
Find PermitRootLogin, will be back yes to no, so you can not root remote login, and save and exit.
3, restart ssh:
# / Etc / init.d / ssh restart
This successful change ssh port number, and prohibits remote login root out. It is worth mentioning that, if your Linu x, only the root user before closing root remote login, be sure to create a new user, otherwise it will lead to not use ssh remote login server!