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. https://developer.github.com/guides/using-ssh-agent-forwarding/
And today, suddenly I found my key lost
ssh-add -K [path/to/private SSH key]
ssh-add -l ssh -T firstname.lastname@example.org ssh-add -L
CHMOD for your private key:
chmod 400 ~/.ssh/id_rsa
CHMOD for your public key:
chmod 644 ~/.ssh/id_rsa.pub
CHMOD for .ssh directory
chmod 700 ~/.ssh/id_rsa
Add new file config to ~/.ssh/config
Host * ForwardAgent yes