Add something new to Virb:

Virb

Are you sure you want to delete that?

or Cancel

 

If you would like to add your SSH key to your MediaTemple server so you no longer have to enter a password when connecting to your server, this is how. First off, this assumes you have a unix type machine (Linux, OS X) and you have SSH enabled on your server.

First thing you want to do is login to your server and create a ssh folder:

ssh admin@domain.com

Note: If your on the (gs) Grid Server, then your login will be serveradmin%domain.com@domain.com, use this through out the guide.

After your logged in create your ssh folder, check that it does not already exist:

ls -la

If you don’t see .ssh listed then continue to the next step.

mkdir .ssh

Now logout and we’ll setup our public SSH Key. First we want to check and make sure we don’t already have a public SSH key.

cd .ssh
ls
config        id_rsa.pub
id_rsa        known_hosts

Anything without .pub at the end of it should NOT be shared, this is your private key. If you see that you already have a something.pub skip this next step.

Now if you need to create a public key, this is how:

ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/tom/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/tom/.ssh/id_rsa.
Your public key has been saved in /Users/tom/.ssh/id_rsa.pub.
The key fingerprint is:
50:43:77:c6:97:af:61:82:dc:ea:9b:6b:67:d4:1b:61 tom@volcano

Now we simply need to copy our public SSH key to our server:

scp ~/.ssh/id_rsa.pub admin@domain.com:.ssh/authorized_keys2

Type your password and once it’s copied your done! Logout and login again to make sure it works, if it works then you won’t have to answer a password.

Loading comments...

Likes

Details

Via Stephen Korecky

Viewed 33 times

© 2009 Stephen

virb.com/t/2028203
tweet!

Flag this text post!

Flag this text post as:

or Cancel

 

Advertisement

Flag this profile!

Flag this profile as:

or Cancel