X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
X-Copfilter: Client is part of local network, skipped Spamassassin
X-Copfilter: Sender is in whitelist, skipped SpamAssassin
From: Matthias Meyer <Matthias.Meyer@gmx.li>
To: cygwin@cygwin.com
Subject: Re: cygrunsrv do not automatic start service
Date: Sat, 19 Jul 2008 12:21:27 +0200
User-Agent: KMail/1.9.7
References: <200807170033.07266.Matthias.Meyer@gmx.li> <g5lu0i$617$1@ger.gmane.org>
In-Reply-To: <g5lu0i$617$1@ger.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain;   charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Message-Id: <200807191221.27649.Matthias.Meyer@gmx.li>
X-Copfilter-Originating-IP: 192.168.0.98
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Am Donnerstag 17 Juli 2008 schrieb René Berber:
> Matthias Meyer wrote:
> 
> > I've installed (cygrunsrv -I) a ssh tunnel with:
> > /usr/bin/autossh -M 0 -o ServerAliveInterval=20 -o 
> > ServerAliveCountMax=3 -N -C -i /etc/.ssh/id_rsa -L 389:localhost:389 
> > user@server.at
> > 
> > Unfortunatly this tunnel will not startet at boot time.
> > If I start the service with cygrunsrv -S it will run.
> > 
> > Any hint?
> 
> Several:
> 
> - Did you add the environment string required (AUTOSSH_NTSERVICE)?
> - Did you add a dependency to the network? (not required but it makes 
> sense);
> - Did you install the service to run as your account? (OpenSSH refuses 
> to run if the access to the keys is too lax, or if it has no access as 
> in other users don't have access to your keys).
> 
> The command line I used for installation is (with obfuscated password of 
> course):
> 
> $ cygrunsrv --install autossh --path /usr/bin/autossh --env 
> "AUTOSSH_NTSERVICE=yes" --args "-M 0 -F /etc/autossh/ssh_config.remote 
> rberber@example.com" --user rberber --passwd SECRET -y tcpip
> 
> The configuration file, ssh_config.remote has all the options for ssh:
> 
> $ cat /etc/autossh/ssh_config.legosoft 
>          Host example.com 
>               AddressFamily inet
> BatchMode yes
> #BindAddress 127.0.0.1
> CheckHostIP no
> Compression yes
> LocalForward localhost:3333 sunfire:3333
> Protocol 2
> TCPKeepAlive yes
> 
> I found that using other options, like User, IdentityFile, 
> UserKnownHostsFile, and HostName made the whole tunnel fail, I really 
> don't know why, I didn't experiment further.
> -- 
> René Berber
> 

If I start the service with cygrunsrv -S or from Windows-GUI 
("Administrative Tools", "Services") it will run. Therefore I dont believe 
that the parameters or configuration are not ok.

Matthias
-- 
Don't Panic

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

