文章是从我的个人博客上粘贴过来的,
大家也可以访问 www.iwangzheng.com
在本地执行cap deploy部署的时候会报错:
connection failed for: 11.11.11.11 (Net::SSH::AuthenticationFailed: Authentication failed for user root@11.11.11.11)
也没有提示输密码,但是如果直接用用户名密码是可以登录的
$ssh 11.11.11.11 -l root -p 22222
出现提示root@11.11.11.11‘s password:
这时候会提示输入密码,这是怎么回事呢,
Apparently this issue was with net-ssh gem. I had version 2.8.0 installed recently with some updates to my development environment and was the cause.
I‘m not sure why it was failing, but gem uninstall net-ssh -v
2.8.0
fixed it for me.
If anyone actually knows why this was an issue or how I can correct this issue with the newer version of net-ssh I‘d be interested to hear it
$gem list -l net-ssh
会显示
*** LOCAL GEMS ***
net-ssh (2.8.0, 2.7.0, 2.6.8, 2.3.0)
net-ssh-gateway (1.2.0, 1.1.0)
$ gem uninstall net-ssh -v 2.8.0
Successfully uninstalled net-ssh-2.8.0
$rbenv rehash
再次cap deploy就ok啦。
http://*.com/questions/21560297/capistrano-sshauthenticationfailed-not-prompting-for-password
Capistrano SSH::AuthenticationFailed, not prompting for password,布布扣,bubuko.com
Capistrano SSH::AuthenticationFailed, not prompting for password