Capistrano SSH::AuthenticationFailed, not prompting for password
Figured it out! 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.
The answer may break your rails app due to gem dependancies.
The issue is with net-ssh as was correctly answered by Sparkmasterflex, however whilst this will get capistrano working ok it may break your rails app:
These steps fixed both capistrano and rails for me ...
- In your Gemfile add
gem 'net-ssh', '2.7.0'
- Run
bundle update net-ssh
- Run
bundle
(just to be sure everything is working ok' - Run
gem uninstall net-ssh -v 2.8.0
If you are a rails user you should now be able to run both the rails server and capistrano.
I have a workaround that doesn't require downgrading net-ssh
, per a comment at the link that Zach Lipton posted. Place this code in config/deploy.rb
:
set :ssh_options, { config: false #Other options...}
After I did that, I got another error, Error reading response length from authentication socket.
Found the solution to that here. Execute these commands at your Bash prompt:
$ eval $(ssh-agent)$ ssh-add