user7289
user7289

Reputation: 34348

Amazon EC2 instance

I have setup an amazon EC2 intance using the command line tools. I have create a key pair for it etc. and it is up and running. I try to SSH into it using the following (I am running bash in Snow Leopard):

$ ssh -i ec2-keypair [email protected]

Snow Leopard pops up a box saying "Enter you password for the SSH key "ec2-keypair" ". Can someone please tell me what I should do? If I don't provide a password its just asks me for one in the bash terminal.

Thanks for the response. I create a key pair for Amazon EC2 using:

ec2-add-keypair ec2-keypair

I have create a password protected sash key and now have two files in my .ssh directory:

id_rsa
id_rsa.pub

Do I need to transfer one of these to my EC2 instance? Which one? What is the best way of doing this and where shall I put?

Max.

Any help greatly appreciated as I have spent some while trying to sort this out.

Max.

Upvotes: 3

Views: 6073

Answers (6)

Innocent Anigbo
Innocent Anigbo

Reputation: 4777

The username should be ec2-user and not root. ssh Like this

$ ssh -i ec2-keypair [email protected]

Upvotes: 0

pmagunia
pmagunia

Reputation: 1798

If you're running an Ubuntu image you'll want to use the user 'ubuntu' instead of root for the micro instances. I'm not sure about other ones but for micro you do.

so at the prompt it would look like

$ ssh -i ec2-keypair [email protected]

Upvotes: 0

gareth_bowles
gareth_bowles

Reputation: 21140

As you accepted Max's answer already maybe you're OK now, but you can get that error if the permissions on your keypair file are too permissive. chmod it to 600 (owner read/write, group and all no permisions) and you should be OK.

Upvotes: 3

user7289
user7289

Reputation: 34348

When creating the key pair its best to pipe the output straight into a file so that there are no formatting issues, using:

ec2-add-keypair ec2-keypair | sed '1d' > ec2-keypair

Max.

Upvotes: 2

Cromulent
Cromulent

Reputation: 3818

It is just asking for the password you supplied when you created the key pair. If you didn't supply one then just enter nothing and click OK, otherwise enter the password to continue.

Upvotes: 0

Anon
Anon

Reputation: 290

If I remember correctly when you set up your ssh keys you are prompted to type a passphrase twice. Most of the time you can just press enter twice, leaving the pass phrase blank.

Have you tried just submitting a blank passphrase?

Upvotes: 0

Related Questions