When using the node for development/testing, I’d sometimes like to clone some of our private repos, since Github stopped supporting password authentication a while back, and ideally I don’t want to add the nodes key to my github account, SSH agent forwarding becomes a viable solution.

#Start ssh agent (if you do `ssh-agent` it will print the alternative command)
eval `ssh-agent`
 
# Add identity/key
 
ssh-add
 
# Check that theres an identity
ssh-add -L
 
# Now you should be able to ssh with agent forwarding, either modify your ~/.ssh/config to have a new entry
vim ~/.ssh/config
 
# Host <ip>
#   ForwardAgent yes
 
# or 
ssh -A root@<ip>
 
# Then, you can verify that forwarding works with
echo "$SSH_AUTH_SOCK"
 
# And you should be able to clone your private repos