sftp & scp unconditionally disable agent forwarding for their underlying ssh connections. Unfortunately this makes it difficult to implement a SSH proxy that permits file transfers using pubkey auth with the OpenSSH clients.
Created attachment 594 [details] Add -A option to scp and sftp This adds a -A option to explicitly enable agent forwarding for the file transfer clients.
*** Bug 557 has been marked as a duplicate of this bug. ***
Patch needs to be updated, as it will conflict on both sftp.c (options changed since patch) and scp.c (the declaration of "n" added since patch). Patch changes behaviour in two ways: * Sets ForwardAgent=no by default, ForwardAgent=yes if -A is set. * Sets ForwardAgent=no after processing other args, which allows -oForwardAgent=yes to take effect, as ssh ignores duplicate command-line options. Once updated, I'd very much like this patch to go through.
Created attachment 2683 [details] Add -A option to scp and sftp (updated, git format-patch) This is an updated version of Damien Miller's patch. It should feature-wise be identical, just without merge nightmares.
*** Bug 3065 has been marked as a duplicate of this bug. ***
Created attachment 3328 [details] Add -A option to scp FWIW, here's the full patch for scp from bug 3065.
Created attachment 3437 [details] Allow -A in sftp and scp This option adds support for -A in both scp and sftp. It relies on ssh(1) following first-match-wins when processing its command line arguments (which it does)
patch applied and will be in openssh-8.4
Mass close of all bugs fixed in 8.4 release.