Password-less SSH Login on Media Temple GS account


I’m really not sure why Media Temple support told me this is not possible to do, but it is.

I use Media Temple ssh 5-10 times a day, that’s why typing in

ssh serveradmin@positivesum.org@s43472.gridserver.com

and then entering password is way too slow.

There is a better way.

To login, I use 

ssh ps

ps – is acronym for positivesum.org

In this tutorial, I will explain to you how to set this up.

First, I will address the the Password-less SSH login and then I will tell you how to setup the acronym.

Password-less SSH Login

  1. You need Public Key (run ssh-keygen if you haven’t already)
  2. in your ~/.ssh folder you will have a id_rsa.pub
  3. you need to copy this file to your mediatemple ssh
    scp ~/.ssh/id_rsa.pub serveradmin@yourdomain.com@yourdomain.com:~/.ssh
    should do the trick
  4. now ssh into your media temple
    ssh serveradmin@yourdomain.com@yourdomain.com
  5. run
    cd ~/.ssh
  6. now to add your key to list of authorized_keys run
    cat authorized_keys id_rsa.pub > authorized_keys2
  7. and replace old list with new list
    mv authorized_keys2 authorize_keys
  8. run change mod to protect your authorized_keys file
    chmod 600 authorized_keys
  9. now you should be able to logout
    exit
  10. and log back in without requiring to enter a password.

Acronym instead of your domain name

  1. with vim(or your favorite command line editor) edit ~/.ssh/config,
    vim ~/.ssh/config
  2. add
    Host ps
         HostName s43472.gridserver.com
         User serveradmin@positivesum.org
  3. lines after Host ps have to be indented You have to replace ps with your own acronym(whatever is applicable in your case) and change the HostName and User to your hostname and user name. You can create as many of these entries as you would like for all of your servers.

Here your go, this should work, if it doesn’t let me know in the comments.
 

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts

Reader Comments

Sorry, comments are closed.