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
- You need Public Key (run ssh-keygen if you haven’t already)
- in your ~/.ssh folder you will have a id_rsa.pub
- 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 - now ssh into your media temple
ssh serveradmin@yourdomain.com@yourdomain.com - run
cd ~/.ssh - now to add your key to list of authorized_keys run
cat authorized_keys id_rsa.pub > authorized_keys2 - and replace old list with new list
mv authorized_keys2 authorize_keys - run change mod to protect your authorized_keys file
chmod 600 authorized_keys - now you should be able to logout
exit - and log back in without requiring to enter a password.
Acronym instead of your domain name
- with vim(or your favorite command line editor) edit ~/.ssh/config,
vim ~/.ssh/config - add
Host ps
HostName s43472.gridserver.com
User serveradmin@positivesum.org
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.
