X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: =?ISO-8859-1?Q?Ren=E9_Berber?= <r.berber@computer.org>
Subject:  Re: start ssh port forwarding at boot time
Date:  Sun, 15 Jun 2008 17:54:20 -0500
Lines: 39
Message-ID: <g346il$e7u$1@ger.gmane.org>
References:  <200806152323.12778.Matthias.Meyer@gmx.li> <g34310$6nn$1@ger.gmane.org> <200806160024.16757.Matthias.Meyer@gmx.li>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  quoted-printable
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
In-Reply-To: <200806160024.16757.Matthias.Meyer@gmx.li>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

Matthias Meyer wrote:

[snip]
> $ cygrunsrv -I forward -p /usr/bin/ssh -a "-v -f -2 -N -L 5729:localhost:=
5729 user@myhost.tld" -u root -w password
> $ cygrunsrv -S forward
> cygrunsrv: Error starting a service: StartService:  Win32 error 1069:
> Der Dienst konnte wegen einer fehlerhaften Anmeldung nicht gestartet werd=
en.
>=20
> which means in english:
> The service could not be started because of an incorrect registration.
> But I'm sure. Username and password are correct.

User means Windows user, not root.

Actually there is another way to do the same, instead of running the=20
service as your Windows user (the one that has ~/.ssh/<the keys>), you=20
can pass the -i /path/to/your/home/.ssh/id_dsa (or id_rsa) to ssh.

Snippet from man ssh:

      -i identity_file
              Selects a file from which the identity (private key) for=20
RSA or
              DSA authentication is read.  The default is=20
~/.ssh/identity for
              protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa=20
for pro-
              tocol version 2.  Identity files may also be specified on=20
a per-
              host basis in the configuration file.  It is possible to have
              multiple -i options (and multiple identities specified in=20
config-
              uration files).

--=20
Ren=E9 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/

