Skip to content

SSH client configuration

With SSH you could create the file $HOME/.ssh/config to simplify some ssh setup, like:

  • fix some options.
  • fix remote username for one host.
  • use host alias.

Host aliases

The following example of config file, defines two aliases: spirit1 and jean-zay. They make the command line shorter to connect you to these cluster head nodes. Thus, ssh <login_ipsl_mesocentre>@spirit1.ipsl.fr is replaced by ssh spirit1. Note that the alias jean-zay reuses the alias spirit1 so as to bounce on the spirit head node before connecting to the jean zay head node (if you have registred spirit1 as your connection machine).

Info

Replace <login_ipsl_mesocentre>, <login_jean_zay> and <path_to_ssh_key> with your own setup.

Host *
  ForwardAgent yes
  ServerAliveInterval=120
  ServerAliveCountMax=90
  XAuthLocation /opt/X11/bin/xauth

Host spirit1
   HostName spirit1.ipsl.fr
   User <login_ipsl_mesocentre> # replace with your own login
   ForwardX11 yes
   IdentityFile <path_to_ssh_key> # replace with your own path, e.g. ~/.ssh/id_rsa
   Port 22

Host jean-zay
   HostName jean-zay.idris.fr
   User <login_jean_zay> # replace with your own login
   IdentityFile <path_to_ssh_key> # replace with your own path, e.g. ~/.ssh/id_rsa
   Port 22
   ProxyCommand ssh spirit1 -W %h:%p # proxy jumping with spirit1