Avoiding SSH timeouts on Mac OS?

MacosSsh

Macos Problem Overview


Every time I connect to a server with ssh, the connection is reset after a few minutes if there is no input. However, I want to remove these timeouts as to keep the connection alive for as long as possible.

By looking on different forums, I saw it was possible to modify the ServerAliveInterval option in the /etc/ssh_config file. However, there doesn't seem to be this option in my file. Where could it be?

I'm running OpenSSH_5.2p1 on Snow Leopard.

Thanks!

Macos Solutions


Solution 1 - Macos

Server Alive interval simply sends a null packet to the server at a set time to keep the connection alive, you should just be able to add some thing like into your config file: ~/.ssh/config

Host *
 ServerAliveInterval 60

The second line must be indented with at least one space. * will match any host; if you wanted you could restrict this to particular destinations like *somedomain.com.

Check out http://kehlet.cx/articles/129.html

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMichael Eilers SmithView Question on Stackoverflow
Solution 1 - MacosDominic GreenView Answer on Stackoverflow