From SGEES Wiki
Jump to: navigation, search

Paswordless Login to Servers

Keep Connection Active

To save network resources ITS drops any not active connection by timeout (20 minutes). If you found this annoying, you might add the following lines to the top of your SSH configuration file (~/.ssh/config) :

 Host *
   ServerAliveInterval 100


SSH config file can handle abbreviations and shortcuts for preferred hosts. For example:

Host 017
  User doejohn 

Instead of typing ssh you'll need only run ssh 017

Different Environment for Different Servers

You might find useful to set some environment variables depending on what server you've logged in. Just add following lines to the end of your ~/.bashrc (and edit them according to your needs):

if [ $HOSTNAME == "" ]; then
    # We're logged in locally to our desktop
    export PATH=$HOME/bin:$PATH
    . ~/.bash_completion
elif [ $HOSTNAME == "" ]; then
    echo "We are on SGEES017"
    export GMT_HOME=/usr/local/gmt
    echo "Logged in to: $HOSTNAME"

If connection is not reliable