If you use SSH and are often using your cellphone as a mobile hotspot, or use a MiFi as a hotspot, you probably noticed that if you don’t do anything in your SSH window for a while, the connection drops, usually with a ‘Broken Pipe’ message.
Suffer no more…
Create an ‘.ssh’ directory off your home directory in terminal.
Add a .ssh/config file.
Add the following lines:
TCPKeepAlive no
ServerAliveInterval 1
ServerAliveCountMax 99999999
Then go to lunch, come back and your SSH connection will still be alive and kicking without you having to reconnect. Enjoy.
Leave a Reply