SSH client configuration

These are the options:

Permissions of SSH config file should be 600 or 400: Before editing use:
$ OLDUMASK=$(umask)
$ umask 0077
Next, edit SSH config file. After editing - restore umask:
$ umask $OLDUMASK
Sample contents of ~/.ssh/config or /etc/ssh/ssh_config:
Host *
  ServerAliveInterval 300
  ServerAliveCountMax 2
Host ubuntu2
  Hostname 192.168.56.102
  User tux
  IdentityFile ~/.ssh/id_rsa
-o command line option examples:
ssh -o ServerAliveInterval=300 -o ServerAliveCountMax=2 tux@192.168.56.102
ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no  tux@192.168.56.102