public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problem starting an executable from SSH
       [not found] <CAE4vMRd+-HGNC0OxkhybQUkVZFcB8nfrYex6kMp-vaRfBAG_2Q@mail.gmail.com>
@ 2012-04-09 20:36 ` Jacques Guillou
  2012-04-09 20:43   ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 2+ messages in thread
From: Jacques Guillou @ 2012-04-09 20:36 UTC (permalink / raw)
  To: cygwin

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") ?

Thanks for your help
Best regards
Jacques

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem starting an executable from SSH
  2012-04-09 20:36 ` Problem starting an executable from SSH Jacques Guillou
@ 2012-04-09 20:43   ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 2+ messages in thread
From: Larry Hall (Cygwin) @ 2012-04-09 20:43 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-09 20:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAE4vMRd+-HGNC0OxkhybQUkVZFcB8nfrYex6kMp-vaRfBAG_2Q@mail.gmail.com>
2012-04-09 20:36 ` Problem starting an executable from SSH Jacques Guillou
2012-04-09 20:43   ` Larry Hall (Cygwin)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).