If you’re anything like me, you’re somewhat security-minded.
Because of this, you’ve most likely moved the SSH port on your server(s) to
something other than the standard port 22.
Nothing wrong with a little bit of security through obscurity on top of all of
the other crap you’ve done to lock things down.
Unfortunately, one time I had locked myself out of a box because I had failed to copy over my private key before changing the port number.
Frustrating, but nothing a bit of digging around wouldn’t solve.
Prior to OpenSSH 6.2:
Since OpenSSH 6.2:
You could also go the route of adding the port to your
ssh-copy-id hostname as you normally would!