RFC: ssh-copy-id tweaks

Jim Knoble jmknoble at pobox.com
Wed Feb 6 06:12:54 EST 2008


Circa 2008-02-05 12:48 dixit Bob Proulx:

:   echo "--> $*"
: 
: Because of the leading '-' I worry that some echo implementations
: might confused this with an option syntax.  [...]  But perhaps I worry
: needlessly here.

Good point.  Not necessarily needless worry.  That's the sort of thing
we always hope to leave in the past, but which inevitably arises when
we've gotten comfortable about forgetting it.

  [use 'sed /.../d' instead of 'grep -v' with output of 'ssh-add -L']
 
: [...] using sed is better because the exit status of sed indicates the
: success or failure of the operation.  And if there is an error then we
: would want to see it.

Maybe.  We might want ssh-copy-id to catch the error and emit a friendly
warning message.

: -      if [ ${msgcount} -eq 1 ]; then 
: +      if [ ${msgcount} -eq 1 ]; then
: 
: There is a trailing space on that line.  It would be great if that
: were cleaned up.

Agreed.

: I hate to even suggest this after seeing your efforts but if I were
: doing this I would have piped the script into the remote shell on
: stdin and passed the keys to it through the argument list instead of
: the other way around.[...]

I thought about piping the script to stdin as well, but the script was
somewhat smaller then and it didn't seem as necessary.  It seems to have
grown somewhat....

Thanks for your feedback.

-- 
jim knoble  |  jmknoble at pobox.com  |  http://www.pobox.com/~jmknoble/
(GnuPG key ID: 6F39C2CC  >>>>>>  http://www.pobox.com/~jmknoble/keys/ )
(GnuPG fingerprint: 5024:D578:7CF4:5660:7269::F6F3:B919:9307:6F39:C2CC)
+----------------------------------------------------------------------+
|[L]iberty, as we all know, cannot flourish in a country that is perma-|
| nently on a war footing, or even a near-war footing.  --Aldous Huxley|
+----------------------------------------------------------------------+


More information about the openssh-unix-dev mailing list