Mounting an EC2 instance in Transmit

• ~400 words • 2 minute read

Update: If you look closely, you'll notice a little button with a key icon on it next to the place you enter your password when setting up a new Transmit connection. You can click on this and specify [yourkey].pem, as noted later in these instructions. Probably more useful than the command-line approach for people who are strictly interested in getting up and running Transmit.

Thought this would be useful for anyone who wants to mount his or her EC2 client in Transmit or Cyberduck without setting up an FTP server, users, passwords and the like.

Logging into your EC2 instance

When you initially create your EC2 instance you can get the command line you need to SSH into it via the AWS console. You can retrieve this by going to the EC2 tab in your AWS console. To do this, select the instance you want to log into from the EC2 tab in the AWS console and go to Instance Actions » Connect.

You should see an overlay that shows the command line you can use to log into your instance.

For Linux instances it should look something like this:

ssh -i [yourkey].pem

You have to be in the same directory as [yourkey].pem, but typing this at the command-line will log you into your EC2 instance.

Connect using an SFTP client

To make your EC2 instance accessible from a client like Transmit or Cyberduck, Go to the directory where your key is stored (Typically ~/.ec2, I think) and type in:

ssh-add [yourkey].pem

That's it! Now you can setup a new connection in Transmit:

  • Add a new favorite
  • Be sure to specify it's an SFTP connection
  • The username should be 'root' (Or possibly something else depending on your setup)
  • enter the long EC2 domain [] for the server.
  • Leave the password field blank

It should look something like this (in Transmit):

Click save and test out your connection. Voila! You should be able to connect and see the home directory in the remote pane.

This also means you don't have to use the -i switch on the command line when you SSH into your instance. You can just type:


Making the command simpler

If you want to make logging in from the command line even simpler, you can add this to your ~/.ssh/config file:

**Host** myec2instance **HostName** **User** root

Now from the command-line you should be able to log into your instance by simply typing:

ssh myec2instance

Isn't that nice?