This is the mail archive of the
mailing list for the Cygwin project.
Re: 1.5.25 under XP Pro SP3: autossh service drops connection immediately after pubkey authentication
- From: Andrew Schulman <schulman dot andrew at epamail dot epa dot gov>
- To: cygwin at cygwin dot com
- Date: Fri, 27 Nov 2009 06:59:14 -0500
- Subject: Re: 1.5.25 under XP Pro SP3: autossh service drops connection immediately after pubkey authentication
- References: <email@example.com>
Hi Ashton. I haven't been able to fully look into your problem, but it is
unusual and reads like a bunch of permission problems. Here are my best
> I've had to set /etc/ssh_config StrictHostKeyChecking to No otherwise
> host key verification will fail.
I think you need to create /etc/ssh/ssh_known_hosts and make it writeable by
Or /etc/ssh_known_hosts? Since it appears that you have all of your ssh configs
in /etc instead of /etc/ssh. That is unusual, although I don't think it should
cause any problems for autossh.
> The autossh command line -i switch must look like
> "/cygdrive/c/cygwin/home/Administrator/.ssh/id_rsa" rather than
> "~/.ssh/id_rsa" otherwise it will not find the id_rsa key and the
> connection will fail.
Since your service is running as user SYSTEM, ~ refers to SYSTEM's home, not
> The previous two problems I've managed to workaround although I dont
> understand why they come up in the first place.? In the end however,
> the service manages to start, connects to my Openssh server and
> authenticates, but then immediately drops the connection and the
> autossh service stops.? I am running it as a SYSTEM service and I
> believe I've set all the ownership and permissions correctly.? Regular
> ssh into my server works correctly.? Autossh manually into my server
> works correctly.? How do I fix this last problem?
I've looked at the log you provided (thanks for the detailed report), and it's
not clear what's causing the service to stop. It says
debug2: exec request accepted on channel 1
debug2: channel 1: read<=0 rfd 5 len 0
debug2: channel 1: read failed
and it's all downhill from there. About all I can suggest is to try different
users: either change your service to run as Administrator or, preferably, an
unprivileged user (in which case you'll have to change a bunch of key and
directory ownerships); or if you can, run a shell as SYSTEM and see if you can
connect by ordinary ssh.
Please let me know what you find. I'll update the autossh README if I've
overlooked any important advice there.
Last gasp standard advice I guess would be to update to Cygwin 1.7, but I have
no reason to believe that that would change anything, since autossh so far
hasn't even been rebuilt for 1.7.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple