public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "René Berber" <r.berber@computer.org>
To: cygwin@cygwin.com
Subject: Re: cygrunsrv do not automatic start service
Date: Wed, 16 Jul 2008 22:51:00 -0000	[thread overview]
Message-ID: <g5lu0i$617$1@ger.gmane.org> (raw)
In-Reply-To: <200807170033.07266.Matthias.Meyer@gmx.li>

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


--
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/

  parent reply	other threads:[~2008-07-16 22:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16 22:33 Matthias Meyer
2008-07-16 22:44 ` Larry Hall (Cygwin)
2008-07-19 10:32   ` Matthias Meyer
2008-07-19 10:43     ` Brian Dessent
2008-07-19 12:16       ` Matthias Meyer
2008-07-16 22:51 ` René Berber [this message]
2008-07-19 10:22   ` Matthias Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='g5lu0i$617$1@ger.gmane.org' \
    --to=r.berber@computer.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).