CMD:ssh
# You can test that your local key works by entering ssh -T git@github.com in the terminal:
ssh -T git@github.com
# Attempt to SSH in to github
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
ssh-keygen -t rsa
ssh-copy-id user@host
#Alternatively, you can paste in the keys using SSH:
cat ~/.ssh/id_rsa.pub | ssh user@host "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
# To verify that ssh-agent is running on your computer, type the following command in the terminal:
echo "$SSH_AUTH_SOCK"
# Print out the SSH_AUTH_SOCK variable
/tmp/launch-kNSlgU/Listeners
ssh-add -L
ssh-add ~/.ssh/id_rsa
# On Mac OS X, ssh-agent will "forget" this key, once it gets restarted during reboots.
# But you can import your SSH keys into Keychain using this command:
/usr/bin/ssh-add -K yourkey
Host rds.tunnel
HostName sa.relational.com.au
Port 22222
User keith.lin
LocalForward 1521 sailis-db-1d:1521
Host example.com
ForwardAgent yes