agent-forwarding when SSHing
Use ssh -A, or specify this in ~/.ssh/config:
ForwardAgent Yes
agent-forwarding when SUDOing
Put this in your /etc/sudoers file:
Defaults env_keep=SSH_AUTH_SOCK
agent-forwarding when SUing
I'm not sure. Here are some options that were suggested:
- keychain?
- use sudo -i instead of su, and then use the env_keep=SSH_AUTH_SOCK trick
agent-forwarding from inside tmux/screen
See one of these: (TODO: which one is the clearest / most succinct?)
see here