For security reasons its highly suggested to change SSH port of your server from default to something else. If you have changed the SSH port and wants to connect from other server to your server (for various reasons like if u want to copy backups etc.. from your server to somewhere else) use following technique to connect to your server.

Connect to a server that have custom SSH port:

[syntax type=”html|php|js|css”]sftp -oPort=123 root@123.456.789.10:/home/[/syntax]


One more thing when you are changing your default port (22) to something else please note that its not recommended to change SSH port to any port over 1024. The reason being that non-root processes are allowed to bind to ports over 1024. So, if you have an SSH port that is greater than this, it’s possible for a non-root process to take over the port and masquerade as your SSH server.