Mac OS X 10.4 Tiger
My SSH session is disconnected after a certain amount of inactivity. How can I avoid that?
Some SSH servers, but also firewalls or other iron between your terminal and the SSH server you are connected to, set a timeout on your session and disconnect it if there is no data transfer. To avoid this, use a command of the form
ssh -o 'ServerAliveInterval 60' ?other options? ?user@??remotehost?
which will trigger the client to send a message to the server through the encrypted channel to request a response from it 60 seconds after the last data has been received.
To configure this permanently for all hosts, add the lines
Host *
ServerAliveInterval 60
to your ~/.ssh/config
(create it if it doesn’t exist yet).