ssh agent forwarding fails with "Could not open a connection to your authentication agent"
I'm posting this here because I spent a lot of time trying to find a solution using Google, reading man pages, and consulting a popular book on SSH, all to no avail.
The key to finding the problem was poring over the debugging output.
debug1: Remote: Agent forwarding disabled: mkdtemp() failed: Permission denied
The intermediate machine is a virtual server (RHEL 6.4) hosted by a cloud provider that uses an AWS stack. For reasons I can't explain, this is what permissions on the
/tmp directory were set to:
drwxr-x--- 19 727 727 4096 Nov 28 05:30 tmp
/etc/passwd I couldn't find a user with an ID of 727.
Correcting the permissions like so solved my woes:
sudo chown 0:0 /tmp sudo chmod 1777 /tmp
Can anyone speak to the peculiar ownership of the