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: 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: In-reply-to: Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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? > 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 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