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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With