If you’re using OpenSSH to access EC2, you can tell ssh to use your ec2 public key instead of specifying the public key with the -i option when you connect to one of your ec2 instances. To do this, create or modify your ~/.ssh/config file and add:

host *.amazonaws.com
  IdentityFile PATH_TO_YOUR_AMAZON_EC2_KEY_PAIR

Unlike Putty, you don’t have to do anything to convert your keys. You can also tell ssh to login as ‘root’ by default by adding the line ‘user root’ under the ‘IdentityFile’ option.