Edit /etc/ssh/sshd_config and specify the port as Port 2222 (for example). Then restart the ssh daemon by running /etc/init.d/ssh restart.
Please note that this change will not improve your security! It is easy to check services mapped to ports. For example, if you change SSH port to 2222, and then run a port scan from another computer:
Edit the port line in
/etc/ssh/sshd_config
and restart the ssh server (/etc/init.d/ssh restart
)Edit
/etc/ssh/sshd_config
and specify the port asPort 2222
(for example). Then restart the ssh daemon by running/etc/init.d/ssh restart
.Please note that this change will not improve your security! It is easy to check services mapped to ports. For example, if you change SSH port to 2222, and then run a port scan from another computer:
nmap -A testserver
you will get something like:
Edit: you may find useful the following article on SSH security practices: http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html (#16, in particular).