Why is ssh agent forwarding not working?
It turns out my key was not in the agent, and this fixed it: OS X: ssh-add -K Linux/Unix: ssh-add -k You can list loaded keys using: ssh-add -l ssh-add -L # for more detail
It turns out my key was not in the agent, and this fixed it: OS X: ssh-add -K Linux/Unix: ssh-add -k You can list loaded keys using: ssh-add -l ssh-add -L # for more detail
As you mentioned, the environment variables are removed by sudo, for security reasons. But fortunately sudo is quite configurable: you can tell it precisely which environment variables you want to keep thanks to the env_keep configuration option in /etc/sudoers. For agent forwarding, you need to keep the SSH_AUTH_SOCK environment variable. To do so, simply edit … Read more