How do I change the ssh port to something other than 22 on Ubuntu Hardy?
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:
you will get something like:
2222/tcp open ssh OpenSSH 5.1p1 Debian 6ubuntu2 (protocol 2.0) | ssh-hostkey: 1024 ba:e5:c3:42:f0:7d:9a:c5:f4:32:71:af:a5:f9:9c:b7 (DSA) |_ 2048 bc:cf:68:f9:6f:8a:88:8f:7b:7a:b1:fa:5a:29:24:47 (RSA)
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).
Edit the port line in