I\'ve been using capistrano successfully for a while now and all of a sudden in every project I\'ve lost the ability to deploy.
Environment:
If all the above solutions doesn't work,please restart your system as you might be facing the issue due to net-ssh host connections.when you restart and enter the deployment command ,it will ask to add the identity to known hosts.
I had the same problem while deploying using capistrano Net::SSH::AuthenticationFailed: Authentication failed for user deployer@IP
ssh-copy-id deployer@ip
This will add your keys to server and you can login without password.
First try to connect to your server with certificate (file.pem) with this command:
ssh -i "file.pem" user@yourServerIp
Then try to run cap production deploy. It solved error for me. I think it is because time limit for certificate expired.