summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--contrib/ssh-copy-id2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0243ef42..cc6cd5c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@
ok dtucker@
- (dtucker) Bug #1725: explicitly link libX11 into gnome-ssh-askpass2 using
pkg-config, patch from Colin Watson. Needed for newer linkers (ie gold).
+ - (djm) [contrib/ssh-copy-id] Don't blow up when the agent has no keys;
+ bz#1723 patch from Adeodato Simóvia Colin Watson; ok dtucker@
20100324
- (dtucker) [contrib/cygwin/ssh-host-config] Mount the Windows directory
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
index df74d25c..65c0a8cd 100644
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -19,7 +19,7 @@ if [ "-i" = "$1" ]; then
shift # and this should leave $1 as the target name
fi
else
- if [ x$SSH_AUTH_SOCK != x ] ; then
+ if [ x$SSH_AUTH_SOCK != x ] && ssh-add -L >/dev/null 2>&1; then
GET_ID="$GET_ID ssh-add -L"
fi
fi