need to connect from one Linux machine to another using RSH theough a script
I want to connect from one Linux machine to another machine in a network through RSH and using Shell scripting I should login to the remote machine and I should execute the commands on remote machine so is it possible?
If so can you let me know how can I write shell script using RSH only. Currently when I run the command from one Linuc machine rsh 172.18.25.211 -l root where 172.18.25.211 is the remote machine which is connected in a network over which I am running the command but I am getting the error connection refused. So is RSH is a good solution in connecting to the remote machine and executing the scripts Can you hep me out regarding this. |
On the destination machine...add the ip address into the .rhosts file in root's home directory.
-C |
Quote:
|
Quote:
-C |
If at all possible use ssh instead. rsh and friends are plain text protocols, so your name/passwd/data are avail to anyone who cares to look.
http://www.informit.com/articles/art...p=169465&rll=1 |
Quote:
I'd would recommend using passwordless ssh over rsh. -C |
how to configure the rsh service
I have installed the rsh service in my two linux machines which are in a network and I having .rhost file within the home directory where i mentioned the IP adress of the remote machine but still I am getting connection refused.
The reason behind is the rsh RPM package has been installed and I don't no how to configure this in order to use this service can you provide me the steps to configure and use this service |
Can you provide me link or steps to use the passwordless ssh service
Quote:
ssh 172.18.25.211 (where 172.18.25.211 remote machine connected in a network to my linux machine) It will prompt for the Password, so here I need to type the Password manually but I want to give the password through script so how is it possible are there any options or Like RSH I can login to the remote machine without the Password |
Don't put the passwd in a script, google 'ssh authorised keys' for a passwordless login. Uses ssh keys/certs instead.
|
steps to use RSH and how to configure
Quote:
As I am having an existing scipt usding RSH so I am trying with it but I want to know how to configure and use RSH mean while I will try to use SSH |
Getting the error "connection refused" when using RSH
I am getting the following error when I try to connect to remote host using the following command
[root@rhel4 qauser1]# rsh 172.18.25.210 -l qauser1 connect to address 172.18.25.210: Connection refused Trying krb4 rlogin... connect to address 172.18.25.210: Connection refused trying normal rlogin (/usr/bin/rlogin) 172.18.25.210: Connection refused In my remote machine you can look into the following file [root@rhel3 qauser1]# cat .rhosts 172.18.25.211 qauser1 I think RSH is not properly configured so can you help me out to solve this problem As I am running some Automation scripts and in that one of the script is failing when it is trying to connect to the remote machine So can you provide any other ALternative Using SSH through a script I need to connect to a remote machine |
Quote:
Code:
root@host# rsh 172.18.25.210 cat /dev/null -C |
how to configure RSH
Quote:
It says command not found |
Quote:
Further more, you must update the /etc/hosts file on both machines so that they can "see" each other. Also remember that if you have a firewall in place (even software firewall); it may not work. On most Linux distros there is a built in firewall and you need to allow rsh. Hope this helps....also make sure that rsh is installed. I'd recommend ssh however. Read this <http://blogs.translucentcode.org/mick/archives/000230.html> -C |
All times are GMT -5. The time now is 09:47 PM. |