This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Troubleshooting AutoSSH

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

cygrunsrv \
  --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.

Good luck,

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]