From: David Galloway Date: Fri, 19 Aug 2016 20:11:32 +0000 (-0400) Subject: ceph-post-file: Ignore keys offered by ssh-agent X-Git-Tag: v11.0.1~416^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a61fcb2eac35a149b49efdc9b2ffa675afb968e8;p=ceph.git ceph-post-file: Ignore keys offered by ssh-agent In my case, I had multiple private keys in ssh-agent which resulted in the sftp connection failing despite explicitly specifying the private key to use Signed-off-by: David Galloway --- diff --git a/src/ceph-post-file.in b/src/ceph-post-file.in index 07da4a2c5087..3c9884a14999 100755 --- a/src/ceph-post-file.in +++ b/src/ceph-post-file.in @@ -151,6 +151,7 @@ done # no UserKnownHostsFile so that we don't try to record the IP hash key # GlobalKnownHostsFile so that we are verifying that this is the real drop.ceph.com +# IdentitiesOnly=yes forces sftp to ignore any keys offered by ssh-agent cp "$ssh_key" "$t4" cp "${ssh_key}.pub" "$t4.pub" @@ -160,6 +161,7 @@ sftp -o "IdentityFile=$t4" \ -oCheckHostIP=no \ -oGlobalKnownHostsFile=$known_hosts \ -oBatchMode=no \ + -oIdentitiesOnly=yes \ -b $t1 -- $remote echo "$0: copy the upload id below to share with a dev: