Skip to content

Instantly share code, notes, and snippets.

@arielvalentin
Created September 18, 2015 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arielvalentin/2772754063a1c83b75bb to your computer and use it in GitHub Desktop.
Save arielvalentin/2772754063a1c83b75bb to your computer and use it in GitHub Desktop.
ssh forward-agent
#on the server in /etc/ssh/sshd_config
AllowAgentForwarding on
#on the server /home/ubuntu/.ssh/authorized_keys
# CONTENTS of my public key id_rsa
#on the client in ~/.ssh/config
Host remote_server
User ubuntu
ForwardAgent yes
ariel@local$> ssh-add
ariel@local$> ssh-add -l
2048 ... /Users/ariel/.ssh/id_rsa (RSA)
ariel@local$> ssh -A remote_server
ubuntu@remote-server$> ssh-add -l
4096 a9:40:35:37:1c:f8:6b:8b:f9:60:27:28:85:60:71:97 /home/ubuntu/.ssh/id_rsa_ubuntu (RSA)
#Why don't my SSH keys get forwarded to the remote host????
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment