How to keep ssh sessions alive Posted on 2017-07-26 Edited on 2020-01-01 How to keep ssh sessions aliveCommand option1ssh -o ServerAliveInterval=120 john@example.com Config client file option12345678910# ~/.ssh/config# "ServerAliveInterval" will send a “null packet” every 120 seconds on your SSH connections to keep them alive.# For all hosts (Good)ServerAliveInterval 120# For a selection of hostsHost example.com example2.com ServerAliveInterval 120