X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.7 required=5.0	tests=AWL,BAYES_20,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <CAEYw_qn+GdrfZXbPgJRtOLO_K3qGuAu3o0ZkABvSXgXe0=vumQ@mail.gmail.com>
References: <CAEYw_qkTWJVA770NDexeiKhp1z2d3ii5F7R=Q5ZDUXSkvDFrkQ@mail.gmail.com>	<5036A043.3040906@cygwin.com>	<CAEYw_qn+GdrfZXbPgJRtOLO_K3qGuAu3o0ZkABvSXgXe0=vumQ@mail.gmail.com>
Date: Fri, 24 Aug 2012 17:04:07 +0300
Message-ID: <CAEYw_qk=QS4URWe8HBjVCLZecj4-+VVxmFYvCEMMPYn9j08BfQ@mail.gmail.com>
Subject: Re: Non-interactive SSH connection fails - error: can't open /dev/tty: No such device or address - Host key verification failed
From: Costin Caraivan <costincaraivan@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

> Tried the debug launch, this is the log for a failed connection:
> http://pastebin.com/3WyrhdXq
> So it looks like the client is closing the connection (I think). It
> seems it cannot find /dev/tty, even though it is there and it has the
> rights to access it.
>
> What I find very strange is that there's a different behavior from the
> command line and when launched from an application. The command is
> exactly the same :(

I found the root cause. The Jenkins launcher was launched using
SYSTEM. This system user doesn't have a console, and its home folder
is /.
So the public key authentication could not work :(
As always, the logs were pointing in the right direction: /.ssh/id_rsa
type -1 -> notice the missing ~ or /home/myuser :(

Thanks for the help,
_____________
Costin Caraivan

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

