Operating System - HP-UX
1824252 Members
4119 Online
109669 Solutions
New Discussion юеВ

rcp command dont want to work :(...

 
SOLVED
Go to solution

rcp command dont want to work :(...

Hi, All!

rcp command dont want to work.
And "say" : Login incorrect.
At both station I login as root.
In file .rhosts I type host & login.

Oleg.

9 REPLIES 9
Christopher McCray_1
Honored Contributor

Re: rcp command dont want to work :(...

I assume in your /etc/services file, you have at least the following available:

shell
exec
login
kshell

as well as them being available in /etc/inetd.conf?

Just a thought.

good luck
Chris
It wasn't me!!!!
Patrick Chim
Trusted Contributor

Re: rcp command dont want to work :(...

Hi,

How do you type the command ?

For 2 server A and B, if you type rcp command in B and copy files from A, e.g. rcp A:/tmp/files . , then you have to set the hostname of B in .rhosts and /etc/hosts.equiv and define the B's hostname and IP in /etc/hosts !

Regards,
Patrick
Herve BRANGIER
Respected Contributor

Re: rcp command dont want to work :(...

Hi

I think you can try with another user to verify
if your problem is not because you use root
account.

Another idea (if you connect from host A as root
to host B as root), verify that the first
reply of nslookup on host B for host A IP
address is A hostname. I saw that if you want
to connect to an host using an alias it doesn't
work.

I think that you need to put a CR at the end of
your .rhosts file.

HTH

Herv?

Robin Wakefield
Honored Contributor

Re: rcp command dont want to work :(...

Hi Oleg,

Make sure what you've typed in .rhosts is resolvable using nslookup, and is the primary name returned by this command.

When you say you can login, do you mean from one host to the other without a password?

Rgds, Robin
Animesh Chakraborty
Honored Contributor

Re: rcp command dont want to work :(...

Hi,
Understand that you have entry in .rhost file on both the server.Make sure there is entry in /etc/hosts file as well on both the server.
Try ping hostname

This is a basic thing to try first..still by any chance if u forgotten..

Good luck
Animesh
Did you take a backup?
Marcin Wicinski
Trusted Contributor
Solution

Re: rcp command dont want to work :(...

Hi,

You have to edit .rhosts file and put it into home directory of a user you are logging into. If you do not bother security you can just put + + in one line of .rhosts file.

Later,
Marcin Wicinski
Frank Slootweg
Honored Contributor

Re: rcp command dont want to work :(...

There can be many causes for this.

I advise to first get remsh(1) to work on the target system, i.e. from the target system to itself. When that works, try remsh(1) from the source system to the target system. When that works, try rcp(1) from the target system to itself. When that works, try rcp(1) from the source system to the target system.

I always start with a simple "remsh host date" command, i.e.:

remsh `hostname` date

Some common issues: The .rhosts file must be in the home directory of the user and owned by the user, i.e. .rhosts for root must be in ~root/.rhosts (which may be different from /.rhosts !) and must be owned by root (ll(1)).

Other common issues are the name resolving, FQDN versus hostname and inetd.conf and inetd.sec, which, at least partially, have been mentioned by the others.


rick jones
Honored Contributor

Re: rcp command dont want to work :(...

in addition to being owned by the user, the .rhost file must (iirc) not be writable by anyone other than the user.

i would suggest that you not use .rhost and consider not using r-services if your system is connected directly to the internet.
there is no rest for the wicked yet the virtuous have no pillows
Wodisch
Honored Contributor

Re: rcp command dont want to work :(...

Hello Oleg,

do an "rlogin" from station A to station B.
Then (on station B) do an "who am I -u" and you
will see the name that station B is using for station A.
This name you have to use in station B's ".rhosts".

Do the same from B to A.

Now you should be fine.

HTH,
Wodisch