Re: How Can I Securely Execute Script on Remote Windows Host? - SSH

This is a discussion on Re: How Can I Securely Execute Script on Remote Windows Host? - SSH ; In article , "Will" writes: > "Robert Melson" wrote in message > news:13empmpm7eahm17@corp.supernews.com... >>> SSH implementations certainly cover the authentication requirements, but >>> I >>> don't find a straightforward way to do a synchronous execution of a >>> remote >>> ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: How Can I Securely Execute Script on Remote Windows Host?

  1. Re: How Can I Securely Execute Script on Remote Windows Host?

    In article ,
    "Will" writes:
    > "Robert Melson" wrote in message
    > news:13empmpm7eahm17@corp.supernews.com...
    >>> SSH implementations certainly cover the authentication requirements, but
    >>> I
    >>> don't find a straightforward way to do a synchronous execution of a
    >>> remote
    >>> EXE through the SSH pipe. I do not want to login to a remote shell and
    >>> do
    >>> things manually there. I want to launch an EXE from within a
    >>> client-side
    >>> script and get a return code from one command in the script that will
    >>> tell
    >>> me how the program ran on the remote host after it has finished running.
    >>>
    >>> What options do I have?
    >>>

    >> I'd suggest two things: (1) that you recheck the authentication
    >> options under SSH - there is an option available for, ahh,
    >> "machine authentication"; (2) check out vpn, which tunnels a
    >> secure virtual network between 2 or more machines over an
    >> insecure medium.

    >
    > But mechanically, how do I synchronously invoke a remote script on remote
    > Windows computer B running SSHD from a script running on computer A using
    > SSH?
    >
    > I don't want to manually login to the remote computer. I need to automate
    > a process from a single script that runs on A and invokes some tasks on B.
    >

    Well, I see the folks at comp.security.ssh haven't bothered to
    answer your question "on-group". Sorry 'bout that.

    Just dug out my copy of "SSH, The Secure Shell" (Daniel J. Barrett
    and Richard E. Silverman, O'Reilly, 2001, ISBN 0-596-00011-1). If
    you can lay hands on a copy, look at Chapter 11, and especially at
    11.1, "Unattended SSH: cron and batch jobs". This is a pretty good
    discussion of several methods to solve your problem. If you can't
    locate a copy, let me know off-group and we can take it from
    there.

    Bob Melson

    --
    Robert G. Melson | Rio Grande MicroSolutions | El Paso, Texas
    -----
    "People unfit for freedom---who cannot do much with it---are
    hungry for power." ---Eric Hoffer


  2. Re: How Can I Securely Execute Script on Remote Windows Host?

    >>>>> "RM" == Robert Melson writes:

    RM> In article , "Will"
    RM> writes:
    >> "Robert Melson" wrote in message
    >> news:13empmpm7eahm17@corp.supernews.com...


    >>>> SSH implementations certainly cover the authentication
    >>>> requirements, but I don't find a straightforward way to do a
    >>>> synchronous execution of a remote EXE through the SSH pipe.


    Just the other day I used the Tectia Windows SSH server to execute remote
    commands on a Windows box, just via:

    ssh windows-box "cmd /c foo.exe"

    I'm not sure offhand about getting the return code; that is of course
    implementation dependent. As for getting automated authentication, there
    are ideas and discussion in the section of the snail book that Robert
    pointed out, and here:

    http://www.snailbook.com/faq/no-passphrase.auto.html

    Probably, you'll need to use publickey authentication with a plaintext
    private key on the client side. Note that if your Windows machine is part
    of a domain, the account you log into will only have access to local
    resources, since it won't have domain credentials. If you're coming
    *from* a Windows box as well, some SSH implementations do support
    GSS authentication which can pass Kerberos credentials across the
    connection.

    --
    Richard Silverman
    res@qoxp.net


+ Reply to Thread