This is the mail archive of the
mailing list for the Cygwin project.
Re: Troubleshooting AutoSSH
- From: Andrew Schulman <schulman dot andrew at epamail dot epa dot gov>
- To: cygwin at cygwin dot com
- Date: Fri, 12 Jul 2013 00:51:20 -0400
- Subject: Re: Troubleshooting AutoSSH
- References: <Pine dot BSO dot 4 dot 53 dot 1307111701260 dot 32610 at Mail dot omnitec dot net>
> Trying to debug a session, .. neither AUTOSSH_DEBUG nor AUTOSSH_LOGLEVEL:
> $ env | grep AUTO
> nor -vv:
> cygrunsrv -I AutoSSH -f "remote_link" -p /usr/bin/autossh -a " -vv \
> change the logging info always ("Host key verification filed"); what is
> the correct way to increase the log level?
Your command line looks wrong. Did it get cut off? It's missing some
required information in the -a argument to cygrunsrv. That argument will
have to include all of the arguments you need to pass to autossh: at least
the name of the host that you're connecting to, plus any other autossh or
ssh options. For example, you might also need to include -i keyfile so ssh
will know what key file to load.
For installing autossh as a service, please read
/usr/share/doc/autossh/README.Cygwin. It recommends using something like:
--install autossh \
--path /usr/bin/autossh \
--dep tcpip \
--env "AUTOSSH_NTSERVICE=yes" \
--args "-F /etc/autossh/ssh_config <target_host>" \
<... other autossh args or environment settings ...>
In particular, setting AUTOSSH_NTSERVICE=yes redirects error messages to
stdout. From there cygrunsrv will put them into the service log file, e.g.
/var/log/autossh.log, where you can inspect them. Otherwise I think they
go into the Windows service logs, where you might still find them but
they'll be all split up and hard to find (the interface for that is
In general, if autossh isn't working as you expect, there are three steps
to follow, in order:
(1) Get the ssh command working.
(2) Get the autossh command working.
(3) Get the service working.
Each of these steps depends on the previous ones, so if they fail, the
later ones will too.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple