Step 1
Edit the ssh config files
# /etc/ssh/sshd_config
Change the following lines
#Port 22
#Protocol 2, 1
#ListenAddress 0.0.0.0
Step 2
For more security change the port number
Port 5678 (Any number in 1-5 digits, It should not conflict with gemneral ports. ex., 3306 is MySQL port)
Protocol 2
ListenAddress 64.18.127.85 (Your machine IP Address)
If you would like to disable direct Root Login, scroll down until you find
PermitRootLogin no
Step 3
Once file save restart SSHD service
# /etc/rc.d/init.d/sshd restart
Try your setting with a duplicate session to avoid access trap.
Hello
ReplyDeleteRestrict and secure SSH shell access - Linux Administration
Fantastic job! Thanks for the post. I really liked being here. Can’t wait for more…