This is the mail archive of the
mailing list for the Cygwin project.
Re: cygrunsrv/autossh howto start even the destination address is not reachable yet?
- From: Julio Costa <costaju at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 4 Oct 2009 18:19:59 +0100
- Subject: Re: cygrunsrv/autossh howto start even the destination address is not reachable yet?
- References: <200910041857.36479.Matthias.Meyer@gmx.li>
On Sun, Oct 4, 2009 at 17:57, Matthias Meyer wrote:
> I've running port forwarding in WindowsXP as well as Windows Vista by using
> autossh, running as a service, installed by cygrunsrv.
> cygrunsrv -I service-tunnel -f "secure tunnel for service" \
> Â Â Â Â-n -t auto -y tcpip -O -u $priv_user -w $priv_pwd -p /bin/nice \
> Â Â Â Â-a "-n 10 /bin/autossh -R 12345:localhost:22 \
> Â Â Â Â-M 0 -N -C -i /etc/ssh/id_rsa -p 24 email@example.com
> My problem is:
> If the client have a dialin connection to an internet provider, the internet
> connection isn't established when the autossh service will be started.
> Therefore I get an error message:
> ssh: Could not resolve hostname server.domain.at: no address associated with
> How to configure/install the service wether in a way that he waits for an
> established internet connection or in a way that he try again until the
> hostname can be resolved?
> If autossh is started succesfull and I disconnect the internet connection,
> autossh will try again and again until the connection is established again.
> But autossh do not start if the hostname can not be resolved.
I use autossh a lot, although not in a service.
From what I can see, AUTOSSH_GATETIME is your friend.
Add it to the service instalation with -e AUTOSSH_GATETIME=0
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple