handbook, books, note, tutorial, troubleshooting

Ubuntu Server Changing SSH Port 22 to Port 44

Ubuntu Server Changing SSH Port 22




By modify 

sudo nano /etc/ssh/sshd_config

where it says:


# What ports, IPs and protocols we listen for
Port 22 <-- change port to what you need it to be for sample 44

then save and restart ssh server or service 

sudo service ssh restart

Or 

sudo shutdown now -r

and to connect with your server with your new port

ssh user@server-ip -p 44

and if you like to check listen port run:

netstat -an | grep "LISTEN "




Ubuntu Server Changing SSH Port 22 to Port 44