Non-interactive SSH connection fails - error: can't open /dev/tty: No such device or address - Host key verification failed

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Fri Aug 24 10:43:00 GMT 2012


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



More information about the Cygwin mailing list