diff options
author | Damien Miller <djm@mindrot.org> | 2003-01-03 14:34:06 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-01-03 14:34:06 +1100 |
commit | 8aff5cbed75279094e2cf701d6eed38dbe4275b8 (patch) | |
tree | 9ad4488e165b7175b4194ea30f953948aff34159 /contrib/ssh-copy-id | |
parent | 678ee51ff3493f0185dcb23bfb9fb2ba299d89b1 (diff) |
- (djm) Bug #461: ssh-copy-id fails with no arguments. Patch from
cjwatson@debian.org
Diffstat (limited to 'contrib/ssh-copy-id')
-rw-r--r-- | contrib/ssh-copy-id | 7 |
1 files changed, 6 insertions, 1 deletions
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 |