From: djm Date: Fri, 3 Jan 2003 03:34:06 +0000 (+0000) Subject: - (djm) Bug #461: ssh-copy-id fails with no arguments. Patch from X-Git-Tag: V_3_6_P1~112 X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/commitdiff_plain/9300be60be71b56cfa3ee5bf6bb2e9239abb1ae2 - (djm) Bug #461: ssh-copy-id fails with no arguments. Patch from cjwatson@debian.org --- diff --git a/ChangeLog b/ChangeLog index 00d1d7e9..92f5fc88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20030103 + - (djm) Bug #461: ssh-copy-id fails with no arguments. Patch from + cjwatson@debian.org + 20030101 - (stevesk) [session.c sshlogin.c sshlogin.h] complete portable parts of pass addrlen with sockaddr * fix. diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id index 2346761f..a1ad34a8 100644 --- a/contrib/ssh-copy-id +++ b/contrib/ssh-copy-id @@ -29,7 +29,12 @@ if [ -z "`eval $GET_ID`" -a -r "${ID_FILE}" ] ; then fi if [ -z "`eval $GET_ID`" ]; then - echo "$0: ERROR: No identities found" + echo "$0: ERROR: No identities found" >&2 + exit 1 +fi + +if [ "$#" -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then + echo "Usage: $0 [-i [identity_file]] [user@]machine" >&2 exit 1 fi