Re: cygrunsrv autossh - tunnel does not come up

2009-01-27 Thread hooner
king 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/



Re: cygrunsrv autossh - tunnel does not come up

2009-01-09 Thread Andrew Schulman
> > Hm, I'm surprised to hear that.  I haven't run autossh as a service in a 
> > while,
> > but when I did it worked very reliably for me.  Can you tell me anything 
> > more
> > about how or why it fails to start?
> 
> No, sorry, there's no useful information on the events or on any log; I
> just start it manually when it fails.

OK.  Well if you feel like pursuing this, I think that adding -v or -vv into the
autossh arguments in the service definition should give you some useful log
information, which you could post here.  Andrew.


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



Re: cygrunsrv autossh - tunnel does not come up

2009-01-09 Thread René Berber
Andrew Schulman wrote:

> Hm, I'm surprised to hear that.  I haven't run autossh as a service in a 
> while,
> but when I did it worked very reliably for me.  Can you tell me anything more
> about how or why it fails to start?

No, sorry, there's no useful information on the events or on any log; I
just start it manually when it fails.

My guess is that since networking is very slow to get started on my
computer, and that's a feature of my network card / driver (I can see
the link go up on the switch long after boot up, after Windows starts in
fact, about when the login window appears) and the service dependency
doesn't help (that's a feature of Windows, it probably is starting the
service before the network is really up) the first logon attempt fails
and somehow autossh gives up, after bootup it behaves as it should
reestablishing the connection when lost, but not on first start, that's
why I guess the network is not really up and that makes the difference.
-- 
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/



Re: cygrunsrv autossh - tunnel does not come up

2009-01-09 Thread Andrew Schulman
> > I have problems running autossh via cygrunsrv on WIN2003:
> >  
> > /bin/cygrunsrv.exe -I AutoSSH -p /bin/autossh -a "-M 2 -g2CN -R
> > 20120:localhost:3389 -i /etc/key-rsa -p 20012 u...@192.168.100.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
> > u...@192.168.100.12
> > autossh: /bin/autossh -M 2 -g2CN -R 20120:localhost:3389 -i /etc/key-rsa
> > -p 20012 u...@192.168.100.12
> 
> There's a big difference between running it as a service like you did,
> and running it as a user.

Agreed.  "Host key verification failed" tells me that either the permission or
the ownership of /etc/key-rsa is wrong-- if you're going to run autossh as a
SYSTEM service, then the key has to be owned by SYSTEM and only readable by it.
Another possibility is that the key is encrypted, so SYSTEM can't read it
without a password; maybe your user process is getting it from an ssh-agent.

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).

> First thing to try: run the service as your user, i.e. add --user  name> to the service installation.

Yes, this is really better.  I need to recommend this in the autossh README.

> And don't expect too much, I use it all the time and it works but it
> fails to start very often, I end up starting it manually.

Hm, I'm surprised to hear that.  I haven't run autossh as a service in a while,
but when I did it worked very reliably for me.  Can you tell me anything more
about how or why it fails to start?

Andrew.


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



Re: cygrunsrv autossh - tunnel does not come up

2009-01-08 Thread René Berber
hooner wrote:

> I have problems running autossh via cygrunsrv on WIN2003:
>  
> /bin/cygrunsrv.exe -I AutoSSH -p /bin/autossh -a "-M 2 -g2CN -R
> 20120:localhost:3389 -i /etc/key-rsa -p 20012 u...@192.168.100.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
> u...@192.168.100.12
> autossh: /bin/autossh -M 2 -g2CN -R 20120:localhost:3389 -i /etc/key-rsa
> -p 20012 u...@192.168.100.12

There's a big difference between running it as a service like you did,
and running it as a user.

First thing to try: run the service as your user, i.e. add --user  to the service installation.

And don't expect too much, I use it all the time and it works but it
fails to start very often, I end up starting it manually.
-- 
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/



cygrunsrv autossh - tunnel does not come up

2009-01-08 Thread hooner

I have problems running autossh via cygrunsrv on WIN2003:
 
/bin/cygrunsrv.exe -I AutoSSH -p /bin/autossh -a "-M 2 -g2CN -R
20120:localhost:3389 -i /etc/key-rsa -p 20012 u...@192.168.100.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
u...@192.168.100.12
autossh: /bin/autossh -M 2 -g2CN -R 20120:localhost:3389 -i /etc/key-rsa
-p 20012 u...@192.168.100.12

I also tried to use standard 22; no changes then. 

thx for looking into this
H.
-- 
View this message in context: 
http://www.nabble.com/cygrunsrv-autossh---tunnel-does-not-come-up-tp21362436p21362436.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/