
Change the Default SSH Port on Linux
The Secure Shell (SSH) Protocol by default uses port 22, using the default port does not make your system secure. However, changing the default SSH port will stop many automated attacks.
1. Edit the sshd configuration:
$ $ sudo vi /etc/ssh/sshd_config $2. Edit the line ‘Port 22‘ by choosing an appropriate port, make sure it not currently used on the system:
# What ports, IPs and protocols we listen for Port 222223. Restart SSH deamon:
$ $ sudo /etc/init.d/ssh restart $4. Verify SSH by connecting to the new port:
$ $ ssh username@hostname.com -p 22222 $
Sorry Comments are Disabled