Connecting to Amazon EC2 Servers using Coda and Transmit

by Mike Richardson on January 22, 2010

in Code

We’ve recently moved our servers to a new build on the Amazon EC2 cloud infrastructure which has been an interesting process (more posts coming once we’ve launched the site and have a nice cuppa!)

We’re also big biG bIG BIG fans of Panic’s excellent file transfer client (Transmit) and amazing editor (Coda) both of which are Mac-only. However, being used to a keypair from the servers to manage ssh login and sftp transfers, I couldn’t work out how to connect using the default .pem file supplied by Amazon EC2. PEM – or privacy enhanced email – is another cert-based system see the ubiquitous Wikipedia article for more tech juice.

I downloaded my server .pem file to my local ssh directory (you can find this in your user directory called .ssh – notice that the prefix of . makes it invisible normally). I could then login via ssh using

ssh -i ~/.ssh/server.pem

but Coda and Transmit wouldn’t play ball. After some digging around, I discovered the solution…

  1. Replace server.pem with your .pem file in the following instructions
  2. Copy your server.pem file to ~/.ssh
  3. Open terminal and you’ll be in your user directory
  4. Edit (or create) the file config with: vi ~/.ssh/config
  5. Hit “i” to go into insert mode
  6. Add: IdentityFile “~/.ssh/server.pem”
  7. Hit: :wq!<enter> to quit and save
  8. Change the permissions on your pem file with chmod 700 ~/.ssh/server.pem
  9. Configure Coda and Transmit to connect to your server as root with no password
  10. Enjoy!

Job done, which was nice!

Bookmark and Share

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

{ 4 comments… read them below or add one }

1 @rikabel January 22, 2010 at 3:46 pm

dude, you rooool

Reply

2 BeGrandTech January 22, 2010 at 4:27 pm

Just amended the vi command from :q! (which would quit vi without saving -doh!) to :wq! which writes and saves the file.

Reply

3 @teampoop January 26, 2010 at 9:36 pm

hi.. I followed your directions, and was unable to connect.. Then I restarted Coda.. that failed me.. Then I restarted my mac and changed the file permission to executible with
chmod 700 ~/.ssh/server.pem

After that when I started Coda, I was able to connect to my server. Not sure which of those two steps were the one that fixed my issue, but if you're still having problems after following these fine instructions, try my steps.

markie

Reply

4 BeGrandTech January 28, 2010 at 2:02 pm

Hi Markie:

Yep, good catch – I've updated the post. Thanks!

Reply

Leave a Comment

Previous post: Taming Views output with Semantic Views

Next post: Do you need a bug tracker?