I'm having a ridiculous amount of difficulty getting SSH agent forwarding to work effectively for two users.
Both can login to a remote servers without a problem, and it looks like their agents are being forwarded properly (on the server, "echo $SSH_AGENT_SOCK" returns a reference to a socket stored on /tmp/ssh-blahblahbla/agent.blahblah), but neither user can ssh into other servers after landing on any other server first via ssh, nor can they pull from a git repo hosted & accessed via ssh.
All of these things work fine for all other users. The only difference I have noticed, is that for some inexplicable reason, after these problem users ssh into the first server and try to connect to a second, the ssh verbose output shows the following:
debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home/ubuntu/.ssh/identity ((nil)) debug2: key: /home/ubuntu/.ssh/id_rsa ((nil)) debug2: key: /home/ubuntu/.ssh/id_dsa (0x7ff42705ab40) debug3: Wrote 64 bytes for a total of 1127 debug1: Authentications that can continue: publickey debug3: start over, passed a different list publickey debug3: preferred gssapi-keyex,gssapi-with-mic,gssapi,publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Trying private key: /home/ubuntu/.ssh/identity debug3: no such identity: /home/ubuntu/.ssh/identity debug1: Trying private key: /home/ubuntu/.ssh/id_rsa debug3: no such identity: /home/ubuntu/.ssh/id_rsa debug1: Offering public key: /home/ubuntu/.ssh/id_dsa
For successful users, the first few lines reference the socket in /tmp from their $SSH_AUTH_SOCK. I'm baffled, any help on where to start looking?
Also, for reference, it's not necessarily key specific. For one user, I've tried generating two new keys (one of different type, one of different encryption), none of which work.