1829121 Members
1968 Online
109986 Solutions
New Discussion

Can' t run rcp

 
SOLVED
Go to solution
juno2
Super Advisor

Can' t run rcp

I have newly install a linux (host A) and modify the file /root/.rhosts , I added the line to this file - "ip_address of host B root " , but I still can't use rcp to copy file to host A , can suggest can to solve ?
8 REPLIES 8
juno2
Super Advisor

Re: Can' t run rcp

except change the file /root/.rhosts , is there any setting need to change to allow rcp file ? thx.
juno2
Super Advisor

Re: Can' t run rcp

is there any service need to restart ? thx
Jerome Henry
Honored Contributor

Re: Can' t run rcp

everybody was sleeping !

Here we go :

Your .rhost file, being in root directory, do not need to containt 'root'.
It should contain machine names on which you have accounts, say
host A
host B
host C
and so on. Your machines should be referenced on DNS server, or you can use IP if it's not the case.

This .rhost file should be the same on each computer !!

Check that rlogind is on.

It should work.

J
You can lean only on what resists you...
Caesar_3
Esteemed Contributor
Solution

Re: Can' t run rcp

Hello!

All that your $HOME/.rhosts should contain
is the hostnames of the hosts that allow
to made r-commands to this machine without
password.

Caesar
Jerome Henry
Honored Contributor

Re: Can' t run rcp

Oh, yes, I forgot to precise that. Tks Caesar. I was assuming that you were running rcp being root.

If you use another user's account, then it's in /home/user_name/.rhosts that all this should be written.

Difficulty is that most of the time, even if you have same user name, you don't have same UID and GID, and root is the easiest user to handle as it has all rights.

J
You can lean only on what resists you...
Balaji N
Honored Contributor

Re: Can' t run rcp

jerome, in which case u end up comprising the system completely.


juno,

1. what is the error u are getting? Permission denied. or u sure it is no firewall issue.

2. what is the user ur are trying to rcp. root? or some other user. are the names same on both the boxes.

3. does rsh or rlogin work. mean to ask, does rsh between the boxes go without a password.

4. is rsh/rcp/rexec enabled.

5. is there a tcp wrappers running and u have disabled access in hosts.allow or hosts.deny

6. is the rhosts file group/world writable. try access permissions of 400 on this file.

just some random thoughts. dont blame me if it doesnt help :-(
-balaji (working in the nights have made me dull)
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Jerome Henry
Honored Contributor

Re: Can' t run rcp

Yes ! You're right Balaji ! That's why I hate r* commands... I prefer ssh... or to walk to the other computer !

How is it that you slept so few hours this week ? To hot ?

J
You can lean only on what resists you...
Steven E. Protter
Exalted Contributor

Re: Can' t run rcp

Simple very useful test.

Shut down whatever firewall two of the machines are using.

service iptables stop

or

service ichains stop

Then re-run the test.

If it works, you know its a simple firewall problem. You can post the configuration here and we will help, or you can work it out yourself. As I recall port 504 is pretty important.

As others have recommended, Openssh is a much better choice. Its easier to configure and its much more secure.

I'm attaching a doc that can help you get password free file transfer and command running in 10 minutes time.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com