rsh to other machine using script


 
Thread Tools Search this Thread
Operating Systems Linux rsh to other machine using script
# 1  
Old 01-28-2010
rsh to other machine using script

Hi,

I want to rsh to other machine & run a script, but it is nt working

eg:
rsh host command
but after this it doesn't login into that machine & run the command on y machine

but if i write rsh host

then after loggi i write commands it works. Is i am doing something wrong. I jus need a way to loin to other machine & run a group of commands. I am using red hat linux

Thanks
# 2  
Old 01-29-2010
Any reason you're using old-fashioned, insecure-to-the-bone rsh instead of modern ssh?

Quote:
rsh host command
but after this it doesn't login into that machine & run the command on y machine
What does it do instead?
# 3  
Old 03-08-2010
update the .rhosts file in the destination machine

The reason is the destination machine should allow the source machine to execute commands in it. i.e., if you are doing a rsh from host X, the host Y should allow host X to run any commands.

For that you need to add the name of host X in host Y's .rhosts file.

You can give a try after that.

Thanks,
R.Gopinath

Last edited by pludi; 03-09-2010 at 02:10 AM.. Reason: removed self promotion
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to run Klocwork from Machine 1 to machine 2

I use Ubuntu 10.04 in 2 virtual machines. In one machine I have installed Hudson and another machine is to run klocwork. Scenario is when I trigger a build in Hudson, the script has to run successful and call the Klocwork in VM2. In the build script I have given the following command to call... (1 Reply)
Discussion started by: bsreeram
1 Replies

2. Shell Programming and Scripting

How to transfer files from unix machine to local machine using shell script?

Hi All.. Am new to Unix!! Am creating a shell script in which a scenario is like i have transfer the output file from unix machine (Server) to local directory (Windows xp). And also i have to transfer the input file from the local directory to Unix machine (Server) Any help from you... (1 Reply)
Discussion started by: vidhyaS
1 Replies

3. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

4. Shell Programming and Scripting

help with RSH script

Hi All, I wrote a quick script but don't know how to execute the command and bring the info back to me. Please advise. #!/usr/bin/ksh for SYSTEM in xyz abc do echo $SYSTEM rsh $SYSTEM lscfg -v |grep hdisk ## Need to find out how many disk drives it has done (1 Reply)
Discussion started by: samnyc
1 Replies

5. IP Networking

RSH to Ubuntu machine from Solaris machine?

This is probably really basic compared to what you guys are usually talking about here, but I have a problem and I have no idea what to do about it. I try to RSH to my Ubuntu computer from my Solaris one and run into a dead end: >> rsh 192.168.1.103 ::ffff:192.168.1.103: Connection timed out... (4 Replies)
Discussion started by: Bradj47
4 Replies

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

7. Shell Programming and Scripting

awk on a remote machine using 'rsh'

Hi, I want to do a awk operation on a file on a remote machine. I am using rsh for this. rsh <remote> awk '{print $2}' process.txt output: awk: syntax error near line 1 awk:illegal statement near line 1 I can do the awk operation by logging into the remote machine. Can... (1 Reply)
Discussion started by: eamani_sun
1 Replies

8. Shell Programming and Scripting

Cut command on a remote machine using rsh

Hi all, I have a file on a remote machine and I want to do a cut operation on that file. So, I have been doing rsh <remote> " cut -d " " -f 2 <filename> " cut: invalid delimiter But, when I get the file to the local machine and run the same command, I get... (1 Reply)
Discussion started by: eamani_sun
1 Replies

9. Shell Programming and Scripting

unzip in script using rsh

Hi I have searched usr/bin and usr/sbin to try to find unzip but I cannot find it. My script is using the ksh #!/usr/bin/ksh but when I rsh to another box it cannot find unzip to unzip to a new archive, but I can unzip files when I am using a telnet session on the box. The error message... (4 Replies)
Discussion started by: speedieB
4 Replies

10. Shell Programming and Scripting

RSH use for executing a script

I have a script on one server.. which I am trying to run remotely from another server using rsh.... The command that i use from my second server is as follows rsh /user_name="ops" /password="ops1" server1 "cd /users/ops ; ./script1" When I run this I receive an error containing the below... (6 Replies)
Discussion started by: frustrated1
6 Replies
Login or Register to Ask a Question