Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Timeout problems...

From: Stephen Biggs <s.biggs(at)softier.com>
Date: Sun May 11 2003 - 03:39:01 EDT


I am running Redhat 8.0/openssh with ssh -V: OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f

On the other side is a Cygwin installation on Windows 98 with ssh -V: OpenSSH_3.6.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090702f

The Redhat system is buried in a company intranet and has no presence on the Internet.

I am using tunneling by connecting out from the Redhat system to my cygwin system at home with remote port forwarding.

I invoke ssh on the Redhat by:
ssh -v -N -2 -R 1234:<Redhat system>:22 <home>

and then on the cygwin system I can connect back to the Redhat system by simply invoking ssh -p 1234 localhost.

All this works just fine. I am trying to automate this by using a script that is invoked on startup of the Redhat system by the line in /etc/rc.d/rc.local:
su -l <my user id> -c "/home/<my user id>/connect-to-home -r &"

This script is:
for (( ; ; ));
 do
  echo "" >> sshlog.out;
  echo "Start ssh `date`" >> sshlog.out;   ssh -v -N -2 -R 1234:<Redhat system>:22 <home> >> sshlog.out 2>&1;   echo "End ssh `date`" >> sshlog.out;
  sleep 5s;
 done;

Do you need help?X

The problem arises when sshd is shut down on the Cygwin system by any means, such as reboot, or explicit kill. It then takes the Redhat system up to 2 hours to reconnect, that is for the ssh client on the Redhat system to realize that there is no connection and exit so the script can invoke the next go-around. When there is an sshd running on the cygwin system or the port is active and the Redhat client is then invoked, it takes up to 3 minutes to timeout if there is no connection.

What I want is for the Redhat client to realize that the connection has died and then exit and continue banging on the home system until there is an sshd ready to receive, and NOT every two hours.

I tried messing with the TCP keep-alive parameters on the Redhat system but, so far, no luck. I also turned off KeepAlive on both the client and server sides.

How can sshd be shutdown gracefully so that the connected ports are reset? This doesn't solve my problem if my home system has a power failure or some other catastrophic shutdown that doesn't allow port disconnect.

Any ideas? Surely someone has already solved this problem.

Thanks for any help. Received on Mon May 12 11:25:55 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:58 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library