- Run an instance with the your operating system (in my case I choose Fedora 8), when you run select the key-pair and security group.
- Next you need to generate SSH key, you can do that using following command (Do not enter a passphrase)
- ssh-keygen -t rsa
- Now you need to go and edit the ~/.ssh/authorized_keys , For that copy the content of .ssh/id_rsa.pub and paste
- Now open the ~/.ssh/authorized_keys, and change the tail to be “root@domU” , basically you need to remove root@ec2-.. with new one
- Then you need to edit the “~/.ssh/know_hosts” file and add the following,
- *.amazon.com ssh-rsa Asasdas....
- (Asasdas.... = content of rsa.pub)
Now you are all set (unless you need to install some other packages), next step is to bundle your image and register that with EC2 and S3. Then try running more than one instances, now if you try to do ssh among those you will find that you do not need to type the password, or you do not need to specify the key-pairs.