SSH Agent Forwarding Not Working

Tong Sun pkgoyq.xpt at
Thu Jul 12 13:36:40 AEST 2018


I know this might be the most asked question, so I've done anything
possible to troubleshoot the problem myself, but still, my SSH Agent
Forwarding is not working for me.

The best troubleshooting guide that I found, and also the one I've
been using, is the ssh forwarding guide on github -

I've checked all things there, yet it is just still not working. E.g.,

echo "$SSH_AUTH_SOCK" shows correctly on the server and my local
machine, and I have checked both .ssh/config and /etc/ssh_config and
/etc/ssh/sshd_config on the server (machine B) - they're all set up

However, the forwarding doesn't seem to be actually working - "ssh -T
git at" works locally, but not if I run it on the server
(machine B). `ssh-add -l` prints fine locally, but prints "The agent
has no identities" on the server.

I've tried openssh-server with both Ubuntu & Debian,

$ apt-cache policy openssh-server
  Installed: 1:7.6p1-4
  Candidate: 1:7.6p1-4
  Version table:
 *** 1:7.6p1-4 500
        500 bionic/main amd64 Packages

$ apt-cache policy openssh-server
  Installed: 1:7.4p1-10+deb9u3
  Candidate: 1:7.4p1-10+deb9u3
  Version table:
     1:7.7p1-2 50
         50 unstable/main amd64 Packages
 *** 1:7.4p1-10+deb9u3 500

and both are not working.

In the end, this is what I get to ssh from A to C:

$ ssh -T git at
Welcome to GitLab, @myid!

this is what I get to ssh from A to B, then B to C, with my local ~/.ssh folder

$ ssh -T git at
Enter passphrase for key ...

the full `ssh -vvvT git at` is available at (via Debian as B, without my local ~/.ssh folder)
(via Ubuntu as B)

How to troubleshoot the problem from here?
Please help. thx.

More information about the openssh-unix-dev mailing list