Fix forward agent issue

  03 Jan 2017

Today I face an issue after I copied .ssh from Ubuntu machine to my Mac machine. I cannot do ssh and even after I can ssh, I cannot pull source code from the Git Repositories.

Fixed the issue follow these command, it’s NOT step by step tutorial, you have to check the permission and use some debug command to spot where the issue is.

SSH fix forward agent.

ssh-add yourkey_id_rsa  

And today, suddenly I found my key lost

 ssh-add -K [path/to/private SSH key]


ssh-add -l  
ssh -T  
ssh-add -L  

CHMOD for your private key:

chmod 400 ~/.ssh/id_rsa

CHMOD for your public key:

chmod 644 ~/.ssh/

CHMOD for .ssh directory

chmod 700 ~/.ssh/id_rsa

Add new file config to ~/.ssh/config

Host *  
ForwardAgent yes  
comments powered by Disqus