我的 ~/.ssh 文件夹中有这个 id_rsa。但它只是不进行身份验证。如果我复制它并将其重命名为 id_rsa 以外的任何名称,则它可以工作。
[qfan@mycomputer .ssh]$ ls -al id_rsa id_rsa_good
-rw------- 1 qfan qfan 1766 Dec 3 18:35 id_rsa
-rw------- 1 qfan qfan 1766 Nov 20 19:43 id_rsa_good
[qfan@mycomputer .ssh]$ sha1sum id_rsa id_rsa_good
8cc7f68170038b184bba0541be7d105bb36f7d11 id_rsa
8cc7f68170038b184bba0541be7d105bb36f7d11 id_rsa_good
[qfan@mycomputer .ssh]$ ssh localhost -i id_rsa
qfan@localhost's password:
[qfan@mycomputer .ssh]$ ssh localhost -i id_rsa_good
Enter passphrase for key 'id_rsa_good':
Last login: Tue Dec 3 18:46:46 2013 from 127.0.0.1
[qfan@mycomputer ~]$ exit
logout
Connection to localhost closed.
Run Code Online (Sandbox Code Playgroud)
请注意,“ssh localhost -i id_rsa”失败并且 ssh …