1
Dashit 2016 年 9 月 28 日
config 文件贴了看下。
|
2
higocn OP @Dashit config
Host git.mydomain.com Port 65422 HostName git.mydomain.com PreferredAuthentications publickey IdentityFile ~/.ssh/aaa_rsa Host github.com HostName github.com User myname PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa Host * IdentitiesOnly yes 我发现在公司两个都可以访问,在家就只有上边那个可以访问。 |
5
iCyMind 2016 年 9 月 28 日
把私钥文件名改回 id_rsa 试试。
Tip: On most systems the default private keys (~/.ssh/id_rsa, ~/.ssh/id_dsa and ~/.ssh/identity) are automatically added to the SSH authentication agent. You shouldn't need to run ssh-add path/to/key unless you override the file name when you generate a key. https://help.github.com/articles/error-permission-denied-publickey/#make-sure-you-have-a-key-that-is-being-used |