From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57595 invoked by alias); 8 Sep 2016 21:19:01 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 57564 invoked by uid 89); 8 Sep 2016 21:18:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*no, Jeffrey, UD:no, HX-Yahoo-Newman-Property:ymail-3 X-HELO: nm22-vm3.bullet.mail.ir2.yahoo.com Received: from nm22-vm3.bullet.mail.ir2.yahoo.com (HELO nm22-vm3.bullet.mail.ir2.yahoo.com) (212.82.97.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Sep 2016 21:18:49 +0000 Received: from [212.82.98.59] by nm22.bullet.mail.ir2.yahoo.com with NNFMP; 08 Sep 2016 21:18:47 -0000 Received: from [212.82.98.86] by tm12.bullet.mail.ir2.yahoo.com with NNFMP; 08 Sep 2016 21:18:47 -0000 Received: from [127.0.0.1] by omp1023.mail.ir2.yahoo.com with NNFMP; 08 Sep 2016 21:18:47 -0000 Received: from jws11158.mail.ir2.yahoo.com by sendmailws105.mail.ir2.yahoo.com; Thu, 08 Sep 2016 21:18:46 +0000; 1473369526.710 Date: Thu, 08 Sep 2016 21:19:00 -0000 From: morten bjoernsvik Reply-To: morten bjoernsvik To: "jclightner@copper.net" , "cygwin@cygwin.com" Message-ID: <2018762427.3596220.1473369526213@mail.yahoo.com> In-Reply-To: <20160906104335.CCAE4CA4@m0086238.ppops.net> References: <20160906104335.CCAE4CA4@m0086238.ppops.net> Subject: Sv: ssh to Cygwin sshd - command with bat file fails when trust established but works with password authentication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00140.txt.bz2 Hi, In addition to sshd you need cygserver if You like to be able to log in= using certificates. https://cygwin.com/cygwin-ug-net/using-cygserver.html -- MortenB Den Tirsdag, 6. september 2016 19.44 skrev Jeffrey Lightner : Hi all, We recently setup Cygwin (uname =E2=80=93a shows CYGWIN_NT-6.1 ATMEPD01 2.5= .2(0.297/5/3) 2016-06-23 14:29 x86_64 Cygwin) and configured its sshd on o= ne of our Windows 2008 R2 (SP1) servers. The idea is to allow one of our = Linux (RHEL6.8) servers to run a bat file on the Windows server via ssh fro= m a Linux scheduled cron job. Since this will be automated from the Linux s= ide I setup standard ssh trust from the Linux user to a Windows user. Testi= ng the trust verified it works and can be used to login without password an= d to remotely execute Windows bat files. The problem is that there is a specific bat file that is failing when the c= ommand it calls tries to "login" to the Essbase application (i.e. not OS le= vel login) but appears to be running the other commands in the bat file pro= perly. The weirdness is that this failure only occurs when we call it using ssh tr= ust to make the connection. If we make the connection without a trust so th= at it prompts for the OS level password the bat file then executes correctl= y including its application level login. This suggests there is some environmental difference when ssh logs in with = a password vs when it connects with a trust. I've checked the "set" and "en= v" Linux commands output on the Windows user after login as well as the DOS= "set" command output and there is no difference between them when logged i= n via trust vs logged in via password. To reiterate the "login" that is failing is something with the application = not the OS user. The OS user logs in successfully either way. Calling the b= at file works either way =E2=80=93 it is only this application "login" that= is failing from within the bat file and only when done via ssh trust. I also found sshpass allows one to feed the OS level password to the ssh ca= ll and using that from the RHEL6.8 server also works when I call the bat fi= le on the Windows. This reinforces the idea of an environmental difference = between password login and trust connection.=20 Has anyone seen this kind of behavior before and if so can you share what y= ou did to resolve it for trusts? I did search the web and the archives but most hits come up simply to expla= in how to establish a trust vs using password authentication but that isn= =E2=80=99t my problem because the trust itself does work. Also of course = there are many guides talking about how to setup sshd in Cygwin. Since I = can connect via ssh I know sshd is running properly. I=E2=80=99ve been us= ing ssh on Linux and UNIX for years. I=E2=80=99ve also been using Cygwin o= n Windows laptops for years but this is the first time I=E2=80=99m using it= s sshd and I=E2=80=99ll admit I=E2=80=99m stumped on this one. It doesn= =E2=80=99t seem it should care which way I got logged in (password vs trust= ) once I actually am logged in but clearly it does care. -- 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