[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Remote Shell Question



Vikram Nanda wrote:
> Hi,
>
> I have a shell script on Unix box A. I want to execute it on another 
> Unix box B from the box A. The restriction is that the script file
> cannot physically land (or copied) on B. Is there any way this could
> be accomplished through rsh/rexec ?
>
> Thanks,
> Vikram
    Well provided you have SSH you could always do the following...

       user at boxA$ ssh -T user at boxB < /path/to/script/on/boxA

    This should pass the contents of the script that is redirected over
the SSH channel and execute it within a tty. Alternatively you could
redirect the output back to a file on box like such:

       user at boxA$ ssh -T user at boxB < /path/to/script > /path/to/file

    Regards,
    Jeremy