ssh-copy-id enhancement 2013-01-01

Me dajoker at gmail.com
Wed Jan 2 02:39:56 EST 2013


I and others have enjoyed using the ssh-copy-id script for most systems,
but when port numbers on target systems are changed it goes from being
trivial to use to requiring a decent knowledge of how to set target ports
on the client side in other ways (for example, ~/.ssh/config or something
like that).  Since these cases are the exception it'd be nice if
ssh-copy-id could handle alternate ports from the calling command like
'ssh' and 'scp' (and others) do.  To this end I am attaching a unified-diff
file with changes that implement this.  I've done basic testing on systems
both with and without alternate ports and believe it works fairly well.

For the forum thread that started all of this (finally convinced me to fix
it for myself too) see the following from openSUSE, if interested:
http://forums.opensuse.org/showthread.php?t=481944

I built this against the ssh-copy-id file in ./openssh/contrib from cvs,
though the script exactly matches (compared via checksum) the one that
openSUSE 12.2 ships as well.  I also attached the modified script just in
case I somehow unified-diff'd incorrectly (I'm not a programmer by trade;
it's possible/likely I fouled something up).

Happy New Year,
Aaron Burgemeister


More information about the openssh-unix-dev mailing list