Adding SSH keys for password-less login with non standard SSH port

As you may know you can login to your SSH server with use of DSA/RSA keys without entering password. The simplest way to add key to the remote server is ssh-copy-id script. Here is an example of how you can add key if you use non standard SSH port:

ssh-copy-id -i /home/myuser/.ssh/id_dsa.pub "myuser@example.com -p 2222"

You might need to modify it if you use RSA key.

Didn’t find the answer to your question? Ask it our administrators to reply we will publish on website.

Leave a Reply

Your email address will not be published. Required fields are marked *