viernes, 16 de junio de 2017

How to disable SSH timeout

SSH client will automatically be disconnected from the remote host and prompt after being idle or inactive for a while.

This is due to the SSH server's configuration (often by default) to avoid hanging session and free up resources. These are the related options in the SSH server configuration. A simple way (for single users) is to update or create the file: ~/.ssh/config with the following line that send  the alive packet every 30 seconds to the server:

ServerAliveInterval 30
Or you can execute in the same line when you are accessing to the remote host.

ssh -o ServerAliveInterval 30 user@example.com
A complete explanation about this command and how configure as a administrator you can find here.

Reference:
https://docs.oseems.com/general/application/ssh/disable-timeout
https://www.hackersgarage.com/disable-ssh-timeout.html

No hay comentarios:

Publicar un comentario