[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh tunnel delay



On Tue, Sep 10, 2013 at 02:28:37PM +0200, Juan Sierra Pons wrote:
> 2013/9/10 Sean Alexandre <sean@alexan.org>
> >
> > On Tue, Sep 10, 2013 at 01:11:17PM +0200, Juan Sierra Pons wrote:
> > > Hi,
> > >
> > > I don't see anything strange in the logs provided. Do you see anything
> > > strange in your dmesg, /var/log/daemon.log, etc?
> > >
> > > Is the DNS on the server's side working properly? Sometimes when the
> > > reverse DNS is not properly configure some TCP based services get some
> > > delay on first connection: ssh, mysql, etc
> > >
> > > Can a network issue  be discarded. Please check with mtr: mtr remote server
> > >
> > > Not a solution but a very tiny improvement , launch the tunnel with the -C
> > > (compression) parameter.
> >
> > Thanks for looking at this. The other things you list look fine. I did notice
> > something else with the log, though. Below I type the line "hello". Then
> > there's the 80 second delay. And then there's the log messages after the "hello":
> >
> > debug1: Entering interactive session.
> > client> nc localhost 1110
> > hello
> > debug1: Connection to port 1110 forwarding to localhost port 1212 requested.
> > debug2: fd 6 setting TCP_NODELAY
> > debug2: fd 6 setting O_NONBLOCK
> > debug3: fd 6 is O_NONBLOCK
> > debug1: channel 2: new [direct-tcpip]
> > debug2: channel 2: open confirm rwindow 2097152 rmax 32768
> >
> > I think the delay no longer happens, with subsequent lines,  because
> > TCP_NODELAY and O_NONBLOCK get set. I wonder if there's a way to configure
> > things to set those from the start?
> >
> Hi,
> 
> I have found a kind of workaround:
> http://www.gossamer-threads.com/lists/openssh/bugs/56042
> If the ssh client is invoked with:
> ssh -N host -R port # TCP_NODELAY is not set
> ssh -n host -R port sleep 1d # TCP_NODELAY is set - this is a workaround
> 
> Can you try to launch the tunnel without the -N parameter (maybe you
> can send later the tunnel to background)

I get the same thing, unfortunately, with this:
ssh -o IPQoS="lowdelay lowdelay" -o ExitOnForwardFailure=yes -f -L1110:localhost:1212 skoki3 sleep 1d

I've also added this line to /etc/ssh/sshd_config on the server, and restarted ssh there:
IPQoS lowdelay lowdelay

This bug report makes it sound like the bug's been fixed on Debian 7.0, but maybe not:

Debian Bug report logs - #643312
openssh-client: IPQoS option ignored for AF_INET since 5.9p1-1
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=643312

I've got version 1:6.0p1-4 of openssh-client. The bug report says the problems fixed
there, but maybe not.


Reply to: