From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13894 invoked by alias); 9 Apr 2012 20:43:57 -0000 Received: (qmail 13884 invoked by uid 22791); 9 Apr 2012 20:43:55 -0000 X-SWARE-Spam-Status: No, hits=2.7 required=5.0 tests=AWL,BAYES_00,BOTNET,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from vms173003pub.verizon.net (HELO vms173003pub.verizon.net) (206.46.173.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Apr 2012 20:43:42 +0000 Received: from [192.168.1.231] ([unknown] [108.7.36.242]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M28000Q2C85K300@vms173003.mailsrvcs.net> for cygwin@cygwin.com; Mon, 09 Apr 2012 15:43:21 -0500 (CDT) Message-id: <4F8349E5.7000702@cygwin.com> Date: Mon, 09 Apr 2012 20:43:00 -0000 From: "Larry Hall (Cygwin)" Reply-to: cygwin@cygwin.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-version: 1.0 To: cygwin@cygwin.com Subject: Re: Problem starting an executable from SSH References: In-reply-to: Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit 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 X-SW-Source: 2012-04/txt/msg00246.txt.bz2 On 4/9/2012 4:35 PM, Jacques Guillou wrote: > Hello, > > I have some trouble using SSH to remotely start an executable on a > Windows XP which is running SSHD on Cygwin. > If I log into the windows machine using a simple "$ ssh > username@machine_name" command and then start the executable from the > BASH in interactive mode, then everything is fine, but I would > actually like to start the executable directly from the SSH > command-line with the following command: > $ echo "myExecutable" | ssh username@machine_name "bash -s" > The problem is that, in that case, my executable (a C/C++ compiler ".exe" file) > starts successfully but then reports a failure during the check of the > validity of the license. > > So my questions: > - What actually happens when I log with SSH into a Cygwin machine ? > What scripts are started after the authentication has succeeded ? > - What could explain that the behavior of my executable is not the > same in both situations (started from interactive BASH session, or > started directly as input of "bash -s") ? According to the 'ssh' manpage: If command is specified, it is executed on the remote host instead of a login shell. Since you've specified 'bash -s', the statement above applies. Add '-l' and see if that helps. -- 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