我将我的公钥上传到 github,并将我的私钥放在 ~/.ssh/id_rsa 中。
即使在 ~/.ssh/config 中添加 RSAAuthentication=yes 和 PubkeyAuthentication=yes,ssh 似乎也不会尝试任何私钥:
$ ssh -vT [email protected]
....
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
我相信它应该更像这样:
debug1: Authentications that can continue: publickey
debug1: Trying private key id_rsa...
debug1: No more authentication methods to try.
我相信我已经正确设置了 ~/.ssh 和 ~/.ssh/id_rsa 的权限:
/home/doriad/.ssh $ ls -al ~/.ssh
total 40
drwx------ 2 doriad users 4096 Oct 16 16:05 .
drwx------ 81 doriad users 12288 Oct 16 13:22 ..
-rw------- 1 doriad users 174 Oct 16 16:05 config
-rw------- 1 doriad users 147 Oct 16 16:05 config~
-rw------- 1 doriad users 1679 Sep 23 11:45 id_rsa
-rw------- 1 doriad users 402 Sep 23 11:45 id_rsa.pub
-rw-r----- 1 doriad users 5979 Sep 23 11:37 known_hosts
有人能解释为什么它没有尝试我的私钥吗?