Sponsored Content
Special Forums IP Networking Execute script located on a remote machine Post 302666699 by mohtashims on Thursday 5th of July 2012 04:38:20 AM
Old 07-05-2012
Error

Quote:
Originally Posted by gull04
Hi,

You could do this a number of ways, rsh, ssh are just a couple pf examples.

Code:
davem@darkstar--> rsh polaris ls -l
[davem@polaris shm]# ls -l
total 281392
-rw-rw-rw-. 1 root  root    5668387 2006-12-29 20:04 ACFTREF
-rw-rw-rw-. 1 root  root      85970 2001-08-08 13:47 ardata.pdf
-rw-rw-rw-. 1 root  root      44619 2006-11-17 09:58 ARData.pdf
-rw-rw-rw-. 1 root  root    6937444 2006-12-29 20:05 DEALER
-rw-rw-rw-. 1 root  root   33477137 2006-12-29 20:11 DEREG
-rw-r--r--. 1 root  root    9939544 2012-07-04 21:01 dereg_wrk01
-rw-r--r--. 1 root  root    9619084 2012-07-04 21:01 dereg_wrk02
-rw-r--r--. 1 root  root     240392 2012-07-04 21:01 dereg_wrk03
-rw-r--r--. 1 root  root     240392 2012-07-04 21:01 dereg_wrk04
-rw-r--r--. 1 root  root   10099868 2012-07-04 21:01 dereg_wrk05
-rw-r--r--. 1 root  root    4370327 2012-07-04 21:01 dereg_wrk06
-rw-rw-rw-. 1 root  root    5247997 2006-12-29 17:30 DOCINDEX
-rw-rw-rw-. 1 root  root     183409 2006-12-29 20:05 ENGINE
-rw-rw-rw-. 1 root  root      39799 2000-07-06 14:19 format.pdf
-rw-r--r--. 1 root  root       1946 2012-07-05 07:52 input_file_list
-rw-rw-rw-. 1 root  root  100457929 2006-12-29 20:10 MASTER
-rw-r--r--. 1 root  root   12132352 2012-07-05 08:21 mast_wrk00
-rw-r--r--. 1 root  root          0 2012-07-05 08:20 mast_wrk01
-rw-r--r--. 1 root  root   18716339 2012-07-05 08:20 mast_wrk02
-rw-r--r--. 1 root  root   43883632 2012-07-05 08:21 mast_wrk03
-rw-rw-r--. 1 davem davem  12771975 2012-07-04 16:21 new.csv
-rw-rw-r--. 1 davem davem   1093330 2012-07-04 16:52 nomatch
-rw-r--r--. 1 root  root    2101362 2012-07-05 08:21 ref_wrk00
-rw-r--r--. 1 root  root          0 2012-07-05 07:52 ref_wrk01
-rw-r--r--. 1 root  root    2099001 2012-07-05 08:20 ref_wrk02
-rw-rw-rw-. 1 root  root    7453821 2006-12-29 20:04 RESERVED
-rw-rw-r--. 1 davem davem    775151 2012-07-04 16:19 wrong.csv
[davem@polaris shm]

You just have to make sure the correct configs are set up - and that there is some reasonable degree of security in place.

Regards

Dave
What is this ?? On top of my heard. How is it related to my question ? Can you detail the software i need to install and the configuration specifications ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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... (4 Replies)
Discussion started by: balireddy_77
4 Replies

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

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

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

5. Shell Programming and Scripting

unix shell script which inserts some records into a file located in remote servers...

All, I need to write an unix shell script which inserts some records into a file located in remote servers. * Get the input from the user and insert according the first row. It should be in ascending order. 123451,XA,ABA 123452,XB,ABB 123453,XC,ABC 123455,XE,ABE 123456,XF,ABF 123458,XG,ABG... (2 Replies)
Discussion started by: techychap
2 Replies

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

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

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

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

10. 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
All times are GMT -4. The time now is 11:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy