我在服务器 A 上创建了没有密码的密钥
我将密钥放在服务器 B 上:git_id_rsa git_id_rsa.pub
我运行:cat ~/.ssh/git_id_rsa.pub > ~/.ssh/authorized_keys
创建了一个 ssh 配置:
Host *github.com
IdentityFile ~/.ssh/git_id_rsa.pub
我尝试通过 ssh 进行 git clone。我被提升为密码阶段
git clone [email protected]:test/test-chef.git
Cloning into 'test-chef'...
Warning: Permanently added the RSA host key for IP address 'xxx.xxx.xxx.xxx' to the list of known hosts.
Enter passphrase for key '/root/.ssh/git_id_rsa.pub':
那么...我该如何处理本不应该有的密码呢?
答案1
您正在尝试使用公钥而不是私钥作为 SSH 密钥。