delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/07/12/00:51:52

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=e6rQ/Wt7XWJNt7xNl+/8HX/MDF844bUE1JLywaKdjZRz1bA2Bg1qH
fFFhQPVmnYzaGpisXhROgxVhFmfV8KAe96o517kYr8luPhoJbiSIpD62aOwZtd24
vp4IiLnE50LJPhe1ZrDZyYw+24c7NAbnPIUM977nmRr0XwoR0axEDk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; s=default;
bh=cUpTuuSiY9WKEY91sYGj5bzXgZo=; b=iZ8ACAFDcc6R9DvlP6etNb5gTxT6
B5q6AHYbLtbthWY4Z5xtTArT0GrczzNTAZ/xcs2H1weHvLysjLoGDXhnCMHerKj6
n/qhSwl0VPzOircqkkjb1MQT444J9hMMX+H+KfSmjJyo/N7kuqN5nxekc9L7LMkP
S6c5NlPZpx1F/YM=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1
To: cygwin AT cygwin DOT com
From: Andrew Schulman <schulman DOT andrew AT epamail DOT epa DOT gov>
Subject: Re: Troubleshooting AutoSSH
Date: Fri, 12 Jul 2013 00:51:20 -0400
Lines: 50
Message-ID: <tm1vt8pl995u8nvkpebtmbrc0tq3jjmggh@4ax.com>
References: <Pine DOT BSO DOT 4 DOT 53 DOT 1307111701260 DOT 32610 AT Mail DOT omnitec DOT net>
Mime-Version: 1.0
X-Archive: encrypt

> Trying to debug a session, .. neither AUTOSSH_DEBUG nor AUTOSSH_LOGLEVEL:
> 
> $ env | grep AUTO
> AUTOSSH_DEBUG=1
> AUTOSSH_LOGLEVEL=7
> 
> 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
horrible).

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,
Andrew


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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