1) eval $(ssh-agent)
2) ssh-add ~/.ssh/id_rsa
3) echo $SSH_AUTH_SOCK
4)将1)和3)返回的结果写入 .bashrc中。一个示例为:
export SSH_AUTH_SOCK=/tmp/ssh-CDCYWL7GD3Hg/agent.7532
export SSH_AGENT_PID=7533
1) eval $(ssh-agent)
2) ssh-add ~/.ssh/id_rsa
3) echo $SSH_AUTH_SOCK
4)将1)和3)返回的结果写入 .bashrc中。一个示例为:
export SSH_AUTH_SOCK=/tmp/ssh-CDCYWL7GD3Hg/agent.7532
export SSH_AGENT_PID=7533