Avoiding SSH timeouts on Mac OS?

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!


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

链接地址: http://www.djcxy.com/p/33638.html

上一篇: 如何在ssh中将文件传输到ssh服务器

下一篇: 在Mac OS上避免SSH超时?