Permission denied when accessing EC2 instance

I am having a similar problem, but no passphrase is being asked for:

$ ssh -i elasticbamboo.pk ec2-user@ec2-54-234-XXX-XXX.compute-1.amazonaws.com
The authenticity of host 'ec2-54-234-78-100.compute-1.amazonaws.com (54.234.XXX.XXX)' can't be established.
RSA key fingerprint is a3:37:bf:ac:fc:e3:28:8e:34:75:53:f5:e2:5a:de:f7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-54-234-XXX-XXX.compute-1.amazonaws.com,54.234.XXX.XXX' (RSA) to the list of known hosts.
Permission denied (publickey).

4 answers

0 vote

Looks like a key mismatch, maybe someone else regenerated that key on your acount. The resolution is the same - just delete the key pair (or find someone who regenerated it).

How do I delete the key pair? I have deleted the instance and created a new one over and over. I have also changed the configuration to use custom private key and certificate, but still that does not work.

I was refering to Bamboo Admin -> Elastic Bamboo -> Configuration -> AWS Credentials Management

I uploaded both X509 files but that didn't change anything.

I've also tried to ssh with ec2-user, root and bamboo users, but I always get the same error:

$ ssh -i elasticbamboo.pk ec2-user@ec2-50-16-84-24.compute-1.amazonaws.com
Permission denied (publickey).

0 vote

You can't delete the keypair from Bamboo. You have to access AWS console.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,562 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you