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 <dgallowa@redhat.com>
(cherry picked from commit
a61fcb2eac35a149b49efdc9b2ffa675afb968e8)
# 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"
-oCheckHostIP=no \
-oGlobalKnownHostsFile=$known_hosts \
-oBatchMode=no \
+ -oIdentitiesOnly=yes \
-b $t1 -- $remote
echo "$0: copy the upload id below to share with a dev: