How can I connect to my Amazon EC2 server using a desktop client

I think you're asking how you can shorten the following command:

ssh -i ~/path/to/your/ssh_key.pem \
   [email protected]

That can be accomplished with with edits to ~/.ssh/config. The following example ssh config stanza might be helpful:

Host myec2server
  IdentityFile /home/USERNAME/ec2/ec2-keypair.eu-west-1.pem
  User ubuntu
  HostName ec2-79-125-64-190.eu-west-1.compute.amazonaws.com 

Now, you can just type ssh myec2server. see man ssh_config for more ssh_config tricks. You can then combine that with another of the answers here and create a launcher with the command:

gnome-terminal --execute ssh myec2server  

Also related, is a new-ish EC2 feature import-keypair that allows you to upload your own public keys. Then, you can launch new servers with keypairs that you use elsewhere.


You tend not to run desktop instances (that is the full X/GDM/Gnome stack) on server. That graphics stack eats tons of RAM and that very much equates to money when you're talking about EC2.

In short, I think if you're trying to VNC in, you've probably the wrong end of the stick. You certainly can install X et al on a server and then you can install TightVNC (or other) to provide graphical access over network... But if you're just trying to administer a system, learn to use the console and live without it, or use a webmin solution.


Can you not just make a launcher? Something that runs:

gnome-terminal -e "cd where_your_key_is; your amazon command"