You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to ssh into my ec2 instance with my user without issue. However, when I try it with capistrano, I get errors:
cap staging deploy:setup
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as myuser@ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com: Authentication failed for user myuser@ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com
Net::SSH::AuthenticationFailed: Authentication failed for user myuser@ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com
Please try setting your SSH options in a .ssh/config file for the host, to rule out the parsing of the options you have passed via this hash to the server … option... I believe you are using v2x syntax with v3 and thus your input is doing nothing.
I am able to ssh into my ec2 instance with my user without issue. However, when I try it with capistrano, I get errors:
cap staging deploy:setup
I have the following in staging.rb:
server 'ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com',
user: 'myuser',
roles: %w{web db},
ssh_options: {
keys: %w("/home/myuser/.aws/aws_myuser/myuser-key-pair-useast.pem"),
forward_agent: false,
auth_methods: %w(publickey)
}
Yet without capistrano, no issue:
ssh -i ~/.aws/aws_myuser/myuser-key-pair-useast.pem myuser@ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com
Why is this happening? It is really time-consuming trying to figure this out.
The text was updated successfully, but these errors were encountered: