OpenSSH how to keep alive connection
OpenSSH the secure way to manage your server remotly .
System Administrator are efficent and pragmatic , so why keep a connection alive , if the use idle means that the connection is unused and lock a process for nothing .
This is the reason because the ssh servers disconnect users that are not doing anything for some time .
If you are a PRO and you want to keep a connection alive , and you cannot access the sshd_config file you can add keepalive in your client configuration , how ?
I presume that you use your computer as a personal one , so you can put hands on ssh_config . Modify /etc/ssh/ssh_config and add , or decomment :
ServerAliveInterval 60
This send a keepAlive signal to the server .
There’re others interesting directives in the pre mentioned file :
Host *
Protocol 2
Host : is the directive that point to the remote system , * means any . If you want to specify one just put the hostname
Protocol : make the point on the used version
Host , exclude or include hosts to the directives in the /etc/ssh/ssh_config , for exampe :
Host www.sitonerd.com
will apply keepaliveinterval only in ssh connections to www.sitonerd.com
Host *
will apply directives to all .
Have fun on this 18th of August