![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| perl - why is the shell script executed before the print command? | mjays | Shell Programming and Scripting | 3 | 09-21-2007 02:49 AM |
| Unix shell script couldn't be executed. Pls help! | duke0001 | Shell Programming and Scripting | 8 | 09-14-2006 08:15 PM |
| Help - Need simple example of VI executed in shell script | corsart | AIX | 2 | 06-03-2006 03:25 PM |
| executing a remote location script from local server | srivsn | Shell Programming and Scripting | 2 | 02-28-2006 12:16 PM |
| Shell script doesn't get executed using crontab | radhika | Shell Programming and Scripting | 11 | 06-09-2005 01:28 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Local shell script need to be executed on a remote linux box
I need to execute a shell script on a remote linux box. But the shell script resides on the local linux box where I am currently logged in. Is there a way to do this? I know rsh <host> <command> can execute a command on the remote host.
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Sort Command!
When I am sorting a file I am getting a warning message
"Warning: A newline character was added to the end of file". Please let me know hwy I am getting these warnings. Thanks Sumit |
|
#3
|
|||
|
|||
|
ssh
hi,
login as root on your local machine and copy the sh file to remote system using scp command and ssh to remote system and execute there. |
|
#4
|
|||
|
|||
|
Quote:
Don't hijack anothers thread but start a new thread. Thanks. |
|
#5
|
|||
|
|||
|
Quote:
I need to automate this - i.e., I need to write a script which does this (run the local script on the remote box) on may be 100 boxes one by one. |
|
#6
|
||||
|
||||
|
SSH from local to remote
Rajesh,
Depends on what you really want to do? SSH is interactive, it's just like telnet, but secure. You can ssh from your local Linux (or UNIX) to remote box and execute the script. Now, if you don't want to copy the script to the remote box, you can share a local directory using NFS (put your script in that dir). Then ssh to remote server, mount the NFS and execute the script. I think that is what you may be looking for. You can even automate all these steps too! HTH, Nitin |
|
#7
|
|||
|
|||
|
I found that it can be done in 3 steps..
#1. remote copy your local script - this wont ask for password. i think you # need to have same userid/passwd setup on the remote host rcp yourscript.sh remote_hostname:/remote_path/yourscript.sh #2. Execute the script on the remote box rsh remote_host /remote_path/yourscript.sh #3. Delete it rsh remote_host rm /remote_path/yourscript.sh Thanks for your responses... |
|||
| Google The UNIX and Linux Forums |