Howdy. Trying to set up a persistent SSH connection from a remote host, to my own machine with a LocalForward. I am running the ssh process in the foreground so it can be maintained by djb's daemontools to ensure that the connection stays open at all times. But, I am having a problem with the following command (even when run manually from a shell): ssh -N tarkin where in ~/.ssh/config I have the following: Host tarkin User username Protocol 2 LocalForward 466 localhost:25 IdentityFile /home/username/.ssh/id_dsa This works fine without the -N option.. I can log into "tarkin" and get a shell. Using -N, this works only for a short period of time. I can use the locally-forwarded socket and the tunnel is successful. But after a few minutes pass, the connection closes and I get this message in syslog (on the server): sshd[28006]: Disconnecting: No open channels after timeout! The client is FreeBSD-4.4 running OpenSSH 3.0.1p1, the server is OpenBSD 2.9 running OpenSSH 3.0.1. Is there any way to keep a foreground SSH connection open like this? I am also having a secondary issue with this connection but I believe it's unrelated: the _first_ time I connect through the ssh tunnel, I get the following in syslog: sshd[16357]: error: socket: Protocol not supported All following connections through the tunnel do not cause that error to appear. At first I thought perhaps it was a lack of IPv6 support but I tried "telnet -4" on the client system and it didn't make any difference, so I am assuming there is another problem. Any ideas? Not critical, but just a nuisance and possibly a small bug. -- Jim B. vader at conflict.net
On Sun, Nov 25, 2001 at 08:23:19AM +0000, Jim Breton wrote:> I am also having a secondary issue with this connection but I believe > it's unrelated: the _first_ time I connect through the ssh tunnel, I get > the following in syslog: > > sshd[16357]: error: socket: Protocol not supported > > All following connections through the tunnel do not cause that error to > appear. At first I thought perhaps it was a lack of IPv6 support but I > tried "telnet -4" on the client system and it didn't make any > difference, so I am assuming there is another problem. Any ideas? Not > critical, but just a nuisance and possibly a small bug.Correction: this _does_ happen every time (not just the first). I hadn't noticed it because syslogd was collating the errors into one of its "last message repeated n times" messages. This is really very annoying and unusable now, because I have the auth logs going to a printer. ;) Any help with this? Thanks. -- Jim B. vader at conflict.net
On Sun, Nov 25, 2001 at 08:23:19AM +0000, Jim Breton wrote:> sshd[28006]: Disconnecting: No open channels after timeout!openssh does not print this. are you using a modified version of openssh?
On Mon, Nov 26, 2001 at 10:08:51AM +0100, Markus Friedl wrote:> > sshd[28006]: Disconnecting: No open channels after timeout! > > openssh does not print this. are you using a modified > version of openssh?Nope, standard OpenSSH for OpenBSD 2.9. No modifications. I see the string in serverloop.c on line 174. -- Jim B. vader at conflict.net
On Mon, Nov 26, 2001 at 09:27:52AM +0000, Jim Breton wrote:> On Mon, Nov 26, 2001 at 10:08:51AM +0100, Markus Friedl wrote: > > > sshd[28006]: Disconnecting: No open channels after timeout! > > > > openssh does not print this. are you using a modified > > version of openssh? > > Nope, standard OpenSSH for OpenBSD 2.9. No modifications. > > I see the string in serverloop.c on line 174.oh, sorry, yes, i see, but then the server requests this feature. the server has enabled the keep alive hack, and this conflicts with the -N client option.