ssh-agent forwarding and sudo to another user

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

Could not open a connection to your authentication agent

Did You Start ssh-agent? You might need to start ssh-agent before you run the ssh-add command: Note that this will start the agent for msysgit Bash on Windows. If you’re using a different shell or operating system, you might need to use a variant of the command, such as those listed in the other answers. See the following answers: ssh-add complains: Could … Read more

Could not open a connection to your authentication agent

You might need to start ssh-agent before you run the ssh-add command: Note that this will start the agent for msysgit Bash on Windows. If you’re using a different shell or operating system, you might need to use a variant of the command, such as those listed in the other answers. See the following answers: ssh-add complains: Could not open a … Read more