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 [email protected] -p [port] But worked when I tried this ssh-copy-id -i /home/[user]/.ssh/id_rsa.pub “[email protected] -p [port]” Cheers!