delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/23/17:28:17

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=3.6 required=5.0 tests=AWL,BAYES_40,BOTNET,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,TW_YG
X-Spam-Check-By: sourceware.org
Message-id: <5036A043.3040906@cygwin.com>
Date: Thu, 23 Aug 2012 17:27:31 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-to: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Non-interactive SSH connection fails - error: can't open /dev/tty: No such device or address - Host key verification failed
References: <CAEYw_qkTWJVA770NDexeiKhp1z2d3ii5F7R=Q5ZDUXSkvDFrkQ AT mail DOT gmail DOT com>
In-reply-to: <CAEYw_qkTWJVA770NDexeiKhp1z2d3ii5F7R=Q5ZDUXSkvDFrkQ@mail.gmail.com>
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

On 8/23/2012 2:31 PM, Costin Caraivan wrote:
> Hello,
>
> Below you can see the log. The connection is from a Windows 2008
> Cygwin SSH client to a Windows 2008 Cygwin SSHD server.
> The connection works ok when launched from the command line but fails
> when launched from Jenkins (Java Continuous Integration server).
> Jenkins actually creates a temporary batch script containing exactly
> the same command I can run from the command line directly. So: manual
> execution - ok, execution through the script - *ko*.
> The /dev/tty file exists and is rw for everybody. I tried deleting it
> and recreating it, but I can't since Cygwin recreates it before I can
> create a link to /dev/ttySO.
> The connection uses SSH keys with no passphrases.

Can we see cygcheck -srv output for both machines?  Does it work going
from client to client or server to server (i.e. 1 machine only).  Are
you up-to-date?  If so, does the latest snapshot help?

<http://cygwin.com/snapshots/>

> Any other extra debugging ideas? By the way, where can I see the
> Cygwin SSHD server logs? In /var/logs/sshd.log is empty :(

'/var/log/sshd.log'.  But it will be empty if nothing noteworthy
has occurred.  If you want to see more chatter, add a new service entry
to run sshd with debug flags.  You can grab the details for how to set up
a sshd service from '/bin/ssh-host-config' but the basics are:

/usr/bin/cygrunsrv -I sshd_debug -d "CYGWIN Debug sshd" -p /usr/sbin/sshd -a 
"-D -d -d -d" -y tcpip -u cyg_server -w <your cyg_server password here>

The three "-d" flags are the important part.  To start this service, use:

/usr/bin/cygrunsrv -S sshd_debug

This will need to be restarted with each connection attempt.  Also, you
should stop your regular sshd service while running this so they don't
conflict.

/usr/bin/cygrunsrv -E sshd

Apologies for typos.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

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