Thursday, September 2, 2010

Changing SSH port on Ubuntu Server

I followed so many online postings that did not work for me. Apparently Ubuntu has two files for SSHD configuration:
/etc/ssh/ssh_config
and
/etc/ssh/sshd_config
Both of these files have the port setting, but only the second one works for me.
Everyone is giving advice to change the port in the first file, however it just does not work.
After I changed the setting in the
/etc/ssh/sshd_config
and restarted the SSH daemon, all was fine!
Do not forget to restart the daemon:
sudo /etc/init.d/ssh restart

Cheers,
igor