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…
- Replace server.pem with your .pem file in the following instructions
- Copy your server.pem file to ~/.ssh
- Open terminal and you’ll be in your user directory
- Edit (or create) the file config with: vi ~/.ssh/config
- Hit “i” to go into insert mode
- Add: IdentityFile “~/.ssh/server.pem”
- Hit: :wq!<enter> to quit and save
- Change the permissions on your pem file with chmod 700 ~/.ssh/server.pem
- Configure Coda and Transmit to connect to your server as root with no password
- Enjoy!
Job done, which was nice!
{ 6 comments… read them below or add one }
dude, you rooool
Just amended the vi command from :q! (which would quit vi without saving -doh!) to :wq! which writes and saves the file.
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
Hi Markie:
Yep, good catch – I've updated the post. Thanks!
Thanks that really helped!!!
Thank you!