From df08341060fe956ec07514c75b93e7140d2ebda0 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 26 Mar 2010 11:18:27 +1100 Subject: - (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@ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contrib/ssh-copy-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/ssh-copy-id') diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id index df74d25c8..65c0a8cd8 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 -- cgit v1.2.3