Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an Amazon EC2 instance running Ubuntu 10.04. I created my new user with sudo useradd -d /some/path new_user.

Using the new_user, I created a new rsa key, using ssh-keygen -t rsa in the /some/path.

I combined the files to generate the authorized_keys file:

cat .ssh/id*.pub > .ssh/authorized_keys

So, I generated a ppk file with Filezilla and successfully connected to it.

But, one day after, I tried to connect again (with this ppk generated and my new_user), but it doesn't work.

I tried to recreate a new rsa key, just like before, but it still doesn't connect.

Wondering if there was a problem with the new_user created, I created another one (new_user2) and its rsa key. Again, it doesn't work.

At login time server says 'server refused our key' and no supported authentication method available popup.

The ec2-user named ubuntu (default user) works ok.

Does anyone know what could be happening?

I used this tutorial as reference.

I still tried to use this another one, but I came across the same issue.

Below is my putty.log file after this issue:

    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2013.08.22 09:39:08    =~=~=~=~=~=~=~=~=~=~=~=
login as: new_user
Server refused our key

Thanks in advance.

share|improve this question
    
Could you provide the ssh (or putty) logs to the ec2 instance? for ssh, just use ssh -v new_user@your-ec2-ip –  number5 Aug 21 '13 at 23:55
    
@number5, I updated it with my putty.log. It helps? –  José Filipe Lyra Aug 22 '13 at 12:47
    
hmm, I should say I need the event log e.g. static.thegeekstuff.com/wp-content/uploads/2009/08/… try this: When you are logged-in to a PuTTY SSH session, right mouse-click on the PuTTY window title, which will display PuTTY menu. Select ‘Event Log’ menu-item, which will display the following PuTTY event log window. then copy and paste in your question –  number5 Aug 23 '13 at 0:10

1 Answer 1

No need to make things complicated. No need to use a new key. Login using 'ubuntu' then in terminal type

$ su - user2  (or whatever you named it to)
Password:     (enter the password)

Hope that helped :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.