X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <200910041857.36479.Matthias.Meyer@gmx.li> References: <200910041857 DOT 36479 DOT Matthias DOT Meyer AT gmx DOT li> From: Julio Costa Date: Sun, 4 Oct 2009 18:19:59 +0100 Message-ID: Subject: Re: cygrunsrv/autossh howto start even the destination address is not reachable yet? To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, On Sun, Oct 4, 2009 at 17:57, Matthias Meyer wrote: > Hi, > > I've running port forwarding in WindowsXP as well as Windows Vista by usi= ng > autossh, running as a service, installed by cygrunsrv. > > cygrunsrv -I service-tunnel -f "secure tunnel for service" \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0-n -t auto -y tcpip -O -u $priv_user -w $priv_= pwd -p /bin/nice \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0-a "-n 10 /bin/autossh -R 12345:localhost:22 \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0-M 0 -N -C -i /etc/ssh/id_rsa -p 24 user AT serve= r.domain.at > > My problem is: > If the client have a dialin connection to an internet provider, the inter= net > 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 w= ith > name > > 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 agai= n. > But autossh do not start if the hostname can not be resolved. > I use autossh a lot, although not in a service. =46rom what I can see, AUTOSSH_GATETIME is your friend. Add it to the service instalation with -e AUTOSSH_GATETIME=3D0 --=20 ___________ Julio Costa -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple