how to execute a script on remote machine


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to execute a script on remote machine
# 1  
Old 09-27-2006
how to execute a script on remote machine

hi unix guru's
i am new to unix shell programming.

i found a trouble in executing a script(bali.ksh) which is available on serverA with username xyza, this script contains sqlplus command to retrive the data from the database available on other serverC.

Now i need to run the above script from other unix serverB with other username xyzb.

plz let me know the method to solve above problem

thanks and regards
-Bali Reddy
# 2  
Old 09-27-2006
use "remseh", look at the man pages for full syntax.
if you have a security issues you may need to consider "ssh" Secure SHell
# 3  
Old 09-27-2006
Question may i know prerequisite to use ssh

Quote:
Originally Posted by Andrek
use "remseh", look at the man pages for full syntax.
if you have a security issues you may need to consider "ssh" Secure SHell


may i know prerequisite to use ssh
# 4  
Old 09-27-2006
to use rsh ,first you have to configure rsh on both the server

rsh hostname "/path/command_or_script"

but script has to be available on remote system.
# 5  
Old 09-27-2006
theres a web site www.openssh.com but I would start by looking at your vendors support web site to see what they offer as free down loads. At least you know the version of openssh you are about to use has come from a reliable source and you may get help with it directly from them.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can I execute local script on remote machine and include arguments?

I have a script in local server cd /home/dell/work/BOP/testdir ./processchk po (here processchk is a script & po is passed as an argument) Now I want to execute this script from remote server ssh $username@$hostname "cd /home/dell/work/BOP/testdir; ./processchk po" But Its getting error... (9 Replies)
Discussion started by: manohar2013
9 Replies

2. Shell Programming and Scripting

Execute shell script on remote machine

I want to execute a shell script(set of commands) on remote machine and that script takes input from text file(local machine). Please refer below: ssh user@hostname 'bash -s'< ./test.sh file.txt But i got the error file.txt doesn't exist. Can anyone help me on this. Content of test.sh: ... (2 Replies)
Discussion started by: manishtri88
2 Replies

3. UNIX for Dummies Questions & Answers

Execute shell script in remote machine

Hi All, We have 2 servers A and B. B is having a sctipt called b.sh in path /home/dev/scripts. Now my requirement is i want to execute b.sh from server A. Kindly help me. (3 Replies)
Discussion started by: Girish19
3 Replies

4. IP Networking

Execute script located on a remote machine

So, is there way of automating this ? My ultimate goal is to run some cmd script in windows and it should connect to a remote unix host and run a script x.sh located on the remote unix host. I was wanting to achieve this by using WinSCP and Putty only. If possible let me know how and if not... (25 Replies)
Discussion started by: mohtashims
25 Replies

5. Shell Programming and Scripting

[Solved] how Execute a Perl Script from any location on the machine

hi guys, i have a query, i wrote a perl script that will collect cpu statistics Scripts/myScripts/ cpu.pl i want to make this file so that i can run it from any location on any drive, without giving the path explicitly. like $/home/ravi/perl cpu.pl i tried this... (8 Replies)
Discussion started by: niteesh_!7
8 Replies

6. Shell Programming and Scripting

How to execute the same script on another machine

Recently, I need to generate a lot of files from a few master files. In fact, if I relogin to the server machine, my operating would be much faster. My question is this: Can I write a script in which the current path can be automatically saved and relogin to the server to execute my command in the... (0 Replies)
Discussion started by: jiao
0 Replies

7. Shell Programming and Scripting

To execute the same script in another machine

We have a few machines which share the same directory. How can I execute the same script under that directory in different machine while I am using mine? (1 Reply)
Discussion started by: jiao
1 Replies

8. Shell Programming and Scripting

Change user on remote machine and execute script!

Hi, I need to login into remote server and execute a shell script over there. As of now i am making use of ssh command ssh primUser@135.254.242.2 sh /poll.sh I am logging in as primUser but unless i change the user to root the script execution on the remote machine is not possible. ... (5 Replies)
Discussion started by: goutham4u
5 Replies

9. Shell Programming and Scripting

How to execute a script hosted on a machine from a different machine

Hi everyone I intend to trigger a script from one machine say mc1 that actually excutes on different machine say mc2 and redirect the logs to that machine mc2. I tried to use nohup <nfs location of machine >/script.sh > <nfs location of machine >/script.log 2>&1 & nfs location of... (2 Replies)
Discussion started by: harneetmakol
2 Replies

10. Shell Programming and Scripting

Execute command from terminal on remote machine

Hi All, I want to execute some commands on unix machine from the mac machne. I have two options for doing so, I am confused which is the best way of doing. Here are two options. Requirement: Execute command on the remote server machine. Commands to be executed itself contain arguments to be... (0 Replies)
Discussion started by: Ranu
0 Replies
Login or Register to Ask a Question