SSH quick configuration

From Grid5000
Jump to: navigation, search

Configuring SSH to easily access G5K

On your local workstation modify your ssh connection configuration (replace USER with your actual user name):

  • ~/.ssh/config
   Host *.g5k
   ProxyCommand ssh -X <USER> "nc -q 0 `basename %h .g5k` %p"
   User <USER>
   ForwardAgent no

Generate an ssh key to connect to the sites without typing your password (when prompting for a password, just let it blank by typing "enter"):

Terminal.png workstation:
# ssh-keygen -t dsa

Backup your local authorized_keys file:

Terminal.png workstation:
# cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.bckp

Add your key to the authorized_keys file:

Terminal.png workstation:
# cat ~/.ssh/ >> ~/.ssh/authorized_keys

Then, copy this key on (at least) the site where you want to connect. (Grenoble in the example above).

Terminal.png workstation:
# scp -rp ~/.ssh grenoble.g5k:
Note.png Note

You may do this for all the other sites: lille, nancy, grenoble, lyon, sophia, rennes, toulouse, bordeaux, orsay

Now you should be able to connect to Grid'5000 without password by typing:

Terminal.png workstation:
# ssh grenoble.g5k

Then, for security reason, to not enable others to connect your local machine, restore your local authorized_keys file:

Terminal.png workstation:
# mv ~/.ssh/authorized_keys.bckp ~/.ssh/authorized_keys
Personal tools

Public Portal
Users Portal
Admin portal
Wiki special pages