It took me some time to trace out the issue.. may be it will help someone..

This didn’t work for me

ssh-copy-id -i /home/[user]/.ssh/id_rsa.pub user@remoteIP -p [port]

But worked when I tried this

ssh-copy-id -i /home/[user]/.ssh/id_rsa.pub “user@remoteIP -p [port]”

Cheers!

Issue with ssh-copy-id command to server runnning on different SSH port

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.