Tag Archives: SSH

ssh-copy-id and sshd port 0

For security purposes, I don’t run sshd on the default port (22). This gave me some problems when attempting to use the command ssh-copy-id. Ideally, you’d expect the following to work:

?View Code BASH1
ssh-copy-id -p XXXX -i ~/.ssh/id_rsa.pub username@host

However, that didn’t do anything but output an error:
Bad port ‘umask 077; test -d .ssh || mkdir .ssh [...]