Quantcast
Channel: Can't ssh into ec2 box (permission denied) - ECDSA issue - Super User
Viewing all articles
Browse latest Browse all 2

Can't ssh into ec2 box (permission denied) - ECDSA issue

$
0
0

I launched a AWS community Ubuntu 12.04 desktop ec2. I added the host to my ssh config with the identity pem key file to ssh into my ec2.

I got the authorized keys public key file from my ec2 and made a local ~/.ssh/myserver.pub with the public key. I was able to ssh to the box and change its ssh port to a new number. I restarted the ssh service, and was able to ssh again with no issues.

After doing an apt-get update and installing some software, I needed to scp a file to the ec2. SCP kept failing with 'Permission denied (public key).' I tried copying to the remote hosts ubuntu home directory many timesm, but nothing worked.

I exited my ssh session. I tried ssh'ing again, but got the 'Permission denied (public key). I removed my ec2's host entry from my known_hosts file.

Instead of RSA authentication, somehow I'm now getting prompted to authenticate with ECDSA host key.

ECDSA key fingerprint is SHA256 xxxxxxAre you sure you want to continue connecting (yes/no)?debug1: Roaming not allowed by serverdebug1: SSH2_MSG_SERVICE_REQUEST sentdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickeydebug1: Next authentication method: publickeydebug1: Trying private key: x.pemdebug1: Authentications that can continue: publickeydebug1: No more authentication methods to try.Permission denied (publickey).

I tried #ssh-keygen -R <my ec2's ip>:

Host x.x.x.x not found in /Users/username/.ssh/known_hosts

I tried removing my ec2's ECDSA host entry and manually adding the RSA host public key, and sshing in again.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right now (man-in-the-middle attack)!It is also possible that a host key has just been changed.The fingerprint for the RSA key sent by the remote host isSHA256:xxxxxAdd correct host key in /Users/user/.ssh/known_hosts to get rid of this message.RSA host key for [myserver.mydomain.com]:xxxx has changed and you have requested strict checking.

The security group for this ec2 was not changed, so this shouldn't be the issue.

How can I get rid of the ECDSA authentication, and go back to the original RSA authentication for SSH that I started off with?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images