From eb30cc5ad6b439417298b7c615ff8ae15bf00fa2 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Fri, 19 Aug 2016 16:11:32 -0400 Subject: [PATCH] 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 (cherry picked from commit a61fcb2eac35a149b49efdc9b2ffa675afb968e8) --- src/ceph-post-file.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ceph-post-file.in b/src/ceph-post-file.in index 07da4a2c5087c..3c9884a149991 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: -- 2.39.5