Unix administration - Execution of script on different server

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > November 2005 > Execution of script on different server





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Execution of script on different server
kr.badrinath@gmail.com

2005-11-04, 8:50 pm

I have strange scenario could you please give suggestion to me?

Scenario
=======

I have script called try.sh on development server and I wanted to run
that script on the production server with out placing that file on the
prod server.

ie . I have to trigger the script from DEV server which inturn should
trigger it on PROD server.
Only constraint is I should not place the script on PROD server.

FYI - I have login credentials of PROD and DEV .

Please let me know how can I execute the script.

Thanks,
Badri

Helmut Kreft

2005-11-08, 6:29 pm

On 4 Nov 2005 16:37:21 -0800, kr.badrinath@gmail.com wrote:
>
> ie . I have to trigger the script from DEV server which inturn should
> trigger it on PROD server.
> Only constraint is I should not place the script on PROD server.
>


Strange... I suggest the following solution:

titan:~$ cat try.sh
printf "Hello world on "
hostname
titan:~$ ssh kreft@think /bin/sh < try.sh
Password:
Hello world on think
titan:~$

Helmut

--
Almost everything in life is easier to get into than out of.
(Agnes' Law)
kr.badrinath@gmail.com

2005-11-08, 6:29 pm

Thanks Helmut..

Is it possible to pass the password with in the script.
Instead of typing at prompt?

Thanks,
BADri

Bill Marcum

2005-11-08, 6:29 pm

On 6 Nov 2005 19:52:36 -0800, kr.badrinath@gmail.com
<kr.badrinath@gmail.com> wrote:
> Thanks Helmut..
>
> Is it possible to pass the password with in the script.
> Instead of typing at prompt?
>

If you use ssh, you should set up public and private keys so a password
is not needed.

--
The decision doesn't have to be logical; it was unanimous.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com