1

I want to change the SSH key file needed for logging in my Ubuntu EC2 Instance. I know it is not possible to do so directly from the EC2 Management Console so I tried changing it by doing the following:

-Let's call the instance UbuntuA

  1. Created a key pair
  2. Launched a new Ubuntu Instance (let's call it UbuntuB) using the new key pair
  3. Stopped UbuntuA
  4. Detached volume /dev/sda1/ from UbuntuA (Let's call it UbuntuAVolume)
  5. Attached UbuntuAVolme to UbuntuB on /dev/xvdf1
  6. Copied /home/ubuntu/.ssh and /etc/ssh from UbuntuB to UbuntuAVolume
  7. Detached UbuntuAVolume
  8. Re-attached UbuntuAVolume to UbuntuA
  9. Started UbuntuA

But when I attempt to connect with putty I get a Server refused our key error message on the terminal and a fatal error popup saying:

Disconnected: No supported authentiction methods available (server sent: public key)

What am I doing wrong?

4
  • Have you tried deleting your IP address entry in known_hosts file ?.Also i am assuming that your are connecting with Ubuntu2's private key file Dec 21, 2015 at 12:55
  • There is no known_hosts file inside the .ssh directory. And yes I am using the new private key.
    – dimlucas
    Dec 21, 2015 at 13:15
  • what are the errors in servers auth.log?
    – Jakuje
    Dec 21, 2015 at 13:26
  • error: Received disconnect from {MY IP}: No supported authentication methods available [preauth]
    – dimlucas
    Dec 21, 2015 at 14:29

0

You must log in to answer this question.

Browse other questions tagged .