Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Avoide router timeouts during ssh sessions' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Avoide router timeouts during ssh sessions
Authored by: felix-fi on Jun 16, '04 04:39:09PM

Great hint...

It fixes the pb I had with my Netgear MR814 dropping outgoing ssh session.

Too bad this option is not available on the client side too, I had to ask the sysadmin at work to set it on the sshd server.

PS: I know that many other "cheap" routers have this pb of ssh connection dropping.



[ Reply to This | # ]
Avoide router timeouts during ssh sessions
Authored by: JohnnyMnemonic on Jun 16, '04 06:08:26PM
Actually, there is also a similar option on for the client (untested by me).

See ServerAliveInterval on the linked page. I can only assume that it works with the same syntax.

[ Reply to This | # ]
Avoide router timeouts during ssh sessions
Authored by: zadig on Jun 17, '04 06:24:10PM

I tested it. It's important to note that the man page (man ssh) for ssh under Panther does not list the ServerAliveInterval parameter. Adding it to ssh_config doesn't work... the next time you run ssh you see an error:

/etc/ssh_config: line 38: Bad configuration option: ServerAliveInterval

So this option does not appear to be present. You could download and install your own version of SSH that supported this option, I guess. Possibly the version of ssh installed by the fink project would support it, I don't know.



[ Reply to This | # ]
Avoide router timeouts during ssh sessions
Authored by: bill_mcgonigle on Jun 17, '04 08:41:06PM
Unfortunately the Fink stable version is still OpenSSH 3.7 - you need OpenSSH 3.8 to make this work.

Fortunately, it compiles out of the box on Mac OS X - I just did this yesterday on 10.3.4.

Download: ftp://mirrors.rcn.net/pub/OpenBSD/OpenSSH/portable/openssh-3.8p1.tar.gz
Expand it (Stuffit works fine), get to a shell, and cd into the unpacked directory.

Do:

./configure && make && sudo make install

Setup your PATH to include /usr/local/bin first to override the built-in ssh when you type 'ssh bob@foo.com'.

Also, don't bother changing the system-wide config file. Make a file called ~/.ssh/config and put:

ServerAliveInterval 60

in there. Save and go.
So far so good - this works as long as your connection to the machine is stable.


[ Reply to This | # ]
Avoide router timeouts during ssh sessions
Authored by: JohnnyMnemonic on Jun 17, '04 11:49:56PM

That's interesting--only because the original hint for sshd_config works fine on 10.2.8 Server (connecting from only 10.3 clients). In that case, I've changed the ssh server config file--so is it the fact that it's the ssh server being edited and not the ssh client, or the fact that it's an OS X Server instead of an OS X client that's being changed, that allows this to work under 10.2.8--out of the box, no ssh upgrade?



[ Reply to This | # ]
Avoide router timeouts during ssh sessions
Authored by: remko on Jun 18, '04 03:55:51AM

I have the same issue with my NAT. Under Linux, i was able to use the 'ProtocolKeepAlives' parameter at the client side. However, with the exact same (fink) version of ssh under MacOS, this option is absent for some reason.



[ Reply to This | # ]
Avoide router timeouts during ssh sessions
Authored by: pjt33 on Aug 25, '04 03:56:14PM

You can use autossh (available through fink) to keep a connection alive from the client-side. Should I post my Perl script to automatically select a port for autossh as a hint? If anyone wants me to, e-mail me - address obtainable by Googling my username.



[ Reply to This | # ]