Make use of the "ServerAliveInterval" option
ssh user@hostname -o ServerAliveInterval=300
alias sshlive='ssh -o ServerAliveInterval=300'
sshlive user@hostname
alias ssh='ssh -o ServerAliveInterval=300'
ssh user@hostname
Make use of the "ServerAliveInterval" option
ssh user@hostname -o ServerAliveInterval=300
alias sshlive='ssh -o ServerAliveInterval=300'
sshlive user@hostname
alias ssh='ssh -o ServerAliveInterval=300'
ssh user@hostname