How to change the SSH port
1) Login to shell via root.
2) Open the shell configuration file.
vi /etc/ssh/sshd_config
3) Change port.
Uncomment and change
#Port 22
to look like
Port 6472 (choose your own 2 to 5 digit port number (49151 is the highest port number)
4) Save and exit.
shift+:wq
5) Restart shell. (Make sure if you have a firewall installed that you have the new port unblocked.)
/etc/rc.d/init.d/sshd restart
1) Login to shell via root.
2) Open the shell configuration file.
vi /etc/ssh/sshd_config
3) Change port.
Uncomment and change
#Port 22
to look like
Port 6472 (choose your own 2 to 5 digit port number (49151 is the highest port number)
4) Save and exit.
shift+:wq
5) Restart shell. (Make sure if you have a firewall installed that you have the new port unblocked.)
/etc/rc.d/init.d/sshd restart
No comments:
Post a Comment