Net::SSH::AuthenticationFailed: Authentication failed for user vagrant@N.N.N.N

(This is a legacy post from the old website.)

I was having issues getting Capistrano to SSH into a Vagrant VM. I could
shell in myself but Capistrano always returned the following error:

connection failed for: (Net::SSH::AuthenticationFailed: Authentication failed for user vagrant@

Note: is my private network set up in the vagrantfile.


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = 'precise32'
    config.vm.host_name = 'virtualmachine' "private_network", :ip => ''
    config.vm.provider :virtualbox do |v|
        v.customize ["modifyvm", :id, "--memory", 4096]

For me, the problem only occurred with the local VM. Capistrano had no problems interacting with remove web servers via SSH.

Try changing the version of the net-ssh gem in use per this SO post.
For me, locking net-ssh to 2.8.1 solved the issue. There were some
Stackoverflow comments suggesting the bug reappears in newer releases.

Need to get a bootable drive to install OS X (multiple versions suffer) and immediately met the following error?:

This copy of <Some OS X version> application can’t be verified. It may have been corrupted or tampered with during downloading.”

Leave a Reply

Your email address will not be published. Required fields are marked *