Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoiding SSH timeouts on Mac OS? [closed]

Tags:

macos

ssh

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!

like image 653
Michael Eilers Smith Avatar asked Dec 28 '11 19:12

Michael Eilers Smith


1 Answers

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

like image 112
Dominic Green Avatar answered Oct 16 '22 04:10

Dominic Green