1

I created a EC2 instance using the standard Ubuntu 10.04 AMI. I created a private key and named it EC2-priv.ppk

Now I need to connect to the instance from my Ubuntu 9.10 desktop. I'm having some problem with authentication. I tried ssh-add but it didn't work.

I downloaded PuTTY and it worked, but I want to connect using terminal and Nautilus.

-- Also, is there any way to make the private-key authentication unnecessary? I think it would be convenient if I could just use the username and password to log in.

2 Answers 2

1

To use your EC2-priv.ppk key from your Ubuntu desktop you will have to convert it into a format that OpenSSH will understand. You can go this with the PutTTYgen program.

Run PuTTYgen and click on Conversions->Import key. Import your EC2-priv.ppk private key. Then click Conversions->Export OpenSSH key. Save the converted key.

PuTTYgen will also show the public key associated with the private key. This should be added to the $HOME/.ssh/authorized_keys file on your ec2 instance.

Now you have a key in a format that ssh on your Ubuntu system will understand. copy this key to $HOME/.ssh/identity. Ensure that the permissions are 600 on the identity file.

You should now be good to go.

Regarding the use of public key authentication. This really is the way that you should authenticate to your system. It is extremely unlikely that any brute force attack will succeed and is far more secure than simple passwords.

2

Problem solved.

I just disabled PasswordAuthentication in sshd_config. And set a new password by sudo passwd (username)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .