delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/27/17:09:44

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.7 required=5.0 tests=AWL,BAYES_05,DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG
X-Spam-Check-By: sourceware.org
Message-ID: <21695547.post@talk.nabble.com>
Date: Tue, 27 Jan 2009 14:09:31 -0800 (PST)
From: hooner <heiko_newsletter AT freenet DOT de>
To: cygwin AT cygwin DOT com
Subject: Re: cygrunsrv autossh - tunnel does not come up
In-Reply-To: <5uaem4hkujkube83ulle0s8fsm93mghahi@4ax.com>
MIME-Version: 1.0
References: <21362436 DOT post AT talk DOT nabble DOT com> <gk65nu$nqh$1 AT ger DOT gmane DOT org> <5uaem4hkujkube83ulle0s8fsm93mghahi AT 4ax DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com


>
>> > I have problems running autossh via cygrunsrv on WIN2003:
>> >
>> > /bin/cygrunsrv.exe -I AutoSSH -p /bin/autossh -a "-M 20000 -g2CN -R
>> > 20120:localhost:3389 -i /etc/key-rsa -p 20012 user AT 192 DOT 168 DOT 100 DOT 12" -e
>> > AUTOSSH_NTSERVICE=yes -y tcpip --type auto
>> >
>> > As soon as I start the service (net start autossh) it stops. So it
>> looks
>> > like it never came up:
>> > Autossh.log:
>> > 2009/01/08 23:26:25 autossh[10148]: starting ssh (count 1)
>> > 2009/01/08 23:26:25 autossh[10148]: ssh child pid is 9528
>> > Host key verification failed.
>> > 2009/01/08 23:26:25 autossh[10148]: ssh exited prematurely with status
>> 255;
>> > autossh exiting
>> >
>> > Running just ssh or autossh the tunnel comes up and stays:
>> > ssh: ssh -v -g2CN -R 20120:localhost:3389 -i /etc/key-rsa -p 20012
>> > user AT 192 DOT 168 DOT 100 DOT 12
>> > autossh: /bin/autossh -M 20000 -g2CN -R 20120:localhost:3389 -i
>> /etc/key-rsa
>> > -p 20012 user AT 192 DOT 168 DOT 100 DOT 12
>>
>> There's a big difference between running it as a service like you did,
>> and running it as a user.
.......

I have no idea to use a different user on cygwin than my windows domain
root. Should I just edit the /etc/passwd and create a new user pointing to a
new cygwin_home -> /home/new-user?
So I keep trying it with the my dom-root account.

.......
> A good way to get more information about why the service fails to start
> would be
> to add -v or -vv to the ssh flags (within the argument of -a).

okieh; I did the connection using -v with ssh and autossh. Looking to both
outputs I see a big difference

ssh:
bash-3.2$ ssh -v -i /etc/ssh/tu_LAN2DMZ_rsa -g -2C -N -R
20120:localhost:3389 -p 20012 user AT 192 DOT 168 DOT 100 DOT 12
OpenSSH_5.1p1, OpenSSL 0.9.8j 07 Jan 2009
debug1: Reading configuration data /home/root/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 192.168.100.12 [192.168.100.12] port 20012.
debug1: Connection established.
debug1: identity file /etc/ssh/tu_LAN2DMZ_rsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 zlib AT openssh DOT com
debug1: kex: client->server aes128-cbc hmac-md5 zlib AT openssh DOT com
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '[192.168.100.12]:20012' is known and matches the RSA host key.
debug1: Found key in /home/root/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /etc/ssh/tu_LAN2DMZ_rsa
debug1: read PEM private key done: type RSA
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (publickey).
debug1: Remote connections from LOCALHOST:20120 forwarded to local address
local
host:3389
debug1: Requesting no-more-sessions AT openssh DOT com
debug1: Entering interactive session.
debug1: remote forward success for: listen 20120, connect localhost:3389
debug1: All remote forwarding requests processed

autossh:
bash-3.2$ /bin/cygrunsrv.exe -I AutoSSH -p /bin/autossh -a "-v -M 20000
-g2CN -R 20120:localhost:3389 -i /etc/ssh/tu_LAN2DMZ_rsa -p 20012
user AT 192 DOT 168 DOT 100 DOT 12" -e AUTOSSH_NTSERVICE=yes -y tcpip --type auto
2009/01/27 22:22:35 autossh[4876]: starting ssh (count 1)
2009/01/27 22:22:35 autossh[4876]: ssh child pid is 5028
OpenSSH_5.1p1, OpenSSL 0.9.8j 07 Jan 2009
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 192.168.100.12 [192.168.100.12] port 20012.
debug1: Connection established.
debug1: identity file /etc/ssh/tu_LAN2DMZ_rsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 zlib AT openssh DOT com
debug1: kex: client->server aes128-cbc hmac-md5 zlib AT openssh DOT com
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: checking without port identifier
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug1: permanently_drop_suid: 18
ssh_askpass: exec(/usr/sbin/ssh-askpass): No such file or directory
Host key verification failed.
2009/01/27 22:22:36 autossh[4876]: ssh exited prematurely with status 255;
autossh exiting

After the connection is established somehow the autossh don't recon the
known host thing and brings the error with /dev/tty......

sorry, for the output; I tried to make a diff of the two output files in
front but that gave not the full picture....

much thx;
H.
-- 
View this message in context: http://www.nabble.com/cygrunsrv-autossh---tunnel-does-not-come-up-tp21362436p21695547.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019