1833923 Members
3425 Online
110063 Solutions
New Discussion

problems with rcp

 
Jose Ramirez_6
Advisor

problems with rcp

Hi.

I can?t do rcp what with two system, the problem is:
sdmadr5:/# rcp sdmadr5:file1 sdmadr3:file1
remshd: Login incorrect.

the file .rhosts for each system is:

sdmadr5:/# cat .rhosts
sdmadr2
sdmadr3

sdmadr3# cat .rhosts
sdmadr5 root
sdmadr2 root
sdmadr3 root



regards.

JRM
jose ramirez
14 REPLIES 14
Justo Exposito
Esteemed Contributor

Re: problems with rcp

Hi Jos??,

Are the .rhost files in the home directory for the user that try the rcp?

can you do an rlogin between this boxes without need the pssword?

Regards,

Justo.
Help is a Beatiful word
John Palmer
Honored Contributor

Re: problems with rcp

Hi,

I suspect that host smadr3 is not recognising your connection as having originated from smadr5.

To check this, rlogin to smadr3 from smadr5, supply the password so that you login then run 'last -R root' to check where smadr3 thinks you logged in from.

It's likely to be a hostname resolution problem.

Regards,
John
Domenico_5
Respected Contributor

Re: problems with rcp

hi jose

you must use rcp file server:file

if you use rcp server:file server:file


you must add user in .rhost in sdmadr5

regards

dom.
Jose Ramirez_6
Advisor

Re: problems with rcp


Yes, The system sdmadr3 need password whit rlogin
jose ramirez
Justo Exposito
Esteemed Contributor

Re: problems with rcp

Hi Jose,

Then you don't have the .rhost file good defined, do you have the .rhost file in the home directory for the user that try to do the rlogin and the rcp?

This file include the correct hosts and users?

For instance if you want to rlogin or to rcp from hostA to hostB you must define this:

In HostA:
HostB root

In HostB:
HostA root

If the user that try to do the rcp and the rlogin command are root.

Regards,

Justo.
Help is a Beatiful word
Krishna Prasad
Trusted Contributor

Re: problems with rcp

Here's my two cents.

First make sure the two machines can talk to each other via a simple ping.

Then do a nslookup on each machine looking for the other hosts.

Finally try doing a traceroute between the two machines. I had a problem with machines that had multiply names/network interfaces. When I did the traceroute I found that the other interface in the machine was actually responding to my rcp.

I.E. rcp host1.net1:/file .. wasn't working
when I did the traceroute the name of what actually responded was the name of the address in the machine. I had to add both address to the .rhosts files inorder for it to work correctly.

Hope this helps.

Ron
Positive Results requires Positive Thinking
Sukant Naik
Trusted Contributor

Re: problems with rcp

Hi Jose,

Can you try doing something like this

sdmadr5:/# rcp file1 sdmadr3:/

This will work. Because when you specify
sdmadr5:/# rcp sdmadr5:file1 sdmadr3:file1

then the server will check on smadr5 itself whether it can do rlogin to itself.

Also, if the above thing does not work then the .rhosts file on the server smadr5 must look like this:


sdmadr5:/# cat .rhosts
sdmadr2
sdmadr5 root
sdmadr3

Then it will work.

Regards,
Sukant
Who dares he wins
Jose Ramirez_6
Advisor

Re: problems with rcp

Hi.

OK. the password now don??t is necesary but el problem continue.

Regards
jose ramirez
Jose Ramirez_6
Advisor

Re: problems with rcp

hi.


The pings, nslookup and traceroute is ok.

Regards
jose ramirez
Domenico_5
Respected Contributor

Re: problems with rcp

hi jose

reattach the .rhost from either servers.

tnx
Justo Exposito
Esteemed Contributor

Re: problems with rcp

Hi Jose,

Then you must use the rcp command like that:
#hostA: rcp /xxx/yyy/filename hostB:/xxx/uuu

Regards,

Justo.
Help is a Beatiful word
Uday_S_Ankolekar
Honored Contributor

Re: problems with rcp

Hello,

Do you have inetd.sec file in /var/adm directory..??

If yes then you need to put the hostname or the IP address of the system you wish to rcp from on the target host at the following field. login, shell,exec and telnet.

Firest try to rename this file on bothe the server and try rcp if it works then make above changes in the file.

Goodluck,
-USA..
Good Luck..
MANOJ SRIVASTAVA
Honored Contributor

Re: problems with rcp

Hi Jose

Please do like like :

on Host A check , do a cd in the root login and you will go the home directory of root , then vi .rhosts and also add

< IP ADDRESS of HOST B > root

the same you do in the Host B .

Now you should be able to just rlogin from A to B and Vice versa w/o either of tehm asking for passwd . Once this gets through then even rcp will work.
Please enter these entries at the top.

All the best.

Manoj
Govind
Frequent Advisor

Re: problems with rcp

I think the problem is you are not trusting sdmadr5 on sdmadr5. I bet if you do rsh sdmadr5 on sdmadr5 it would ask for a passwd. Try adding sdmadr5 to /.rhosts on sdmadr5 that should fix your problem.
Regards
Govind
Dont try to fix something till it Aint Broke...Honesty is not always the best policy.....