PuTTY Auto Login at Media Temple (gs)

For one of my projects, I use the Media Temple Grid Service for hosting. They offer ssh access to the hosting, which is superb and coupled with svn repositories, enables me to keep all the source there too.
Using a nice, secure complex password to log on with the ssh client, my IDE and my svn client is very tedious – I have to dig out the password every time. It was therefore imperative that I configured the ssh private-public keys so that I could login automatically.
It took me a while to figure it out first time and recently something happened with their servers that caused my ssh login root directory to change (of course they denied this), causing my ssh keys and a few scripts I had to ‘disappear’. This meant that I needed to setup the keys again and although not as bad as the first time, it still took longer than it should. I therefore log the process here to help others that may struggle with setting them up and as a reminder to myself, should another ‘incident’ occur at Media Temple. Here is the process:

  1. Ensure you have putty, puttygen and psftp installed/downloaded
  2. Login to your MediaTemple account using putty
  3. Type: ssh-keygen -t rsa
  4. Follow the instructions to generate the keys. Do not use a pass phrase as we want autologin.
  5. You should now have id_rsa and id_rsa.pub in the .ssh directory
  6. Change directory into .ssh and type: cat id_rsa.pub >> authorized_keys2
  7. FTP into you MediaTemple account using psftp and download the id_rsa file. For Vista users, watch out for UAC. Its best to ensure you download to a safe directory like your desktop
  8. Open up puttygen and select from the menu: conversions->Import Key
  9. Select the id_rsa key file you downloaded and puttygen should then import it
  10. Click Save Private Key and save the .ppk file in a place of your choice
  11. Open up putty and fill in Connection->Data ‘login username’. Then go to Connection->SSH->Auth and select your newly created .ppk file when you click on ‘private key file for authentication’
  12. Save the putty session. This session should now login automatically

The important point here is that the keys were created on the server and then imported to putty. Many of the guides I found create the keys with putty in the first place and that just did not work for me.

 

2 thoughts on “PuTTY Auto Login at Media Temple (gs)

  1. Great guide, just worked perfectly for me as well. I would just add in step #4 that the easiest thing is to just hit Enter and accept the defaults.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.