Operating System - HP-UX
1834675 Members
2853 Online
110069 Solutions
New Discussion

rcp utility on HP Unix B.11.11 U 9000/800

 
diwa
Frequent Advisor

rcp utility on HP Unix B.11.11 U 9000/800

Hi,

I am trying to copy some file from my test unix env to production unix env using rcp cmd:
cmd i am using is:
rcp file1.txt username@hostip:/des path

when i am executing this it is prompting that:

"remshd: Login incorrect."

Could some suggest please what is wroung?

Thanks
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: rcp utility on HP Unix B.11.11 U 9000/800

Hi:

You need to setup a proper 'hosts.equiv' or '.rhosts' file on both servers. See the man pages for 'rhosts'.

Regards!

...JRF...
AwadheshPandey
Honored Contributor

Re: rcp utility on HP Unix B.11.11 U 9000/800

you need to edit /etc/hosts.equiv or users .rhosts file

hostequiv means either the system
/etc/hosts.equiv file or the user .rhosts file. Note that .rhosts
must be owned either by the root or by the user in whose home
directory it is found and it must not be a symbolic link. The
/etc/hosts.equiv file defines system-wide equivalency, whereas a
user's .rhosts file defines equivalency between the local user and any
remote users to whom the local user chooses to allow or deny access.

An entry in the hostequiv file is a single line (no continuations) in
the format:

[hostname [username]] [#comment]

Thus, it can be:

+ A blank line.

+ A comment line, beginning with a #.

+ A host name, optionally followed by a comment.

+ A host name and user name, optionally followed by a comment.
It's kind of fun to do the impossible
diwa
Frequent Advisor

Re: rcp utility on HP Unix B.11.11 U 9000/800

Hi,

Actually i could not find any file like /etc/hosts.equiv but i can see file on both box /etc/hosts in which entries are like that:
The form for each entry is:
#
for example:
192.1.2.34 hpfcrm loghost

Is this is a file?
James R. Ferguson
Acclaimed Contributor

Re: rcp utility on HP Unix B.11.11 U 9000/800

Hi:

> Actually i could not find any file like /etc/hosts.equiv but i can see file on both box /etc/hosts ...

Re-read my first post. You need to establish an '${HOME}.rhosts' or /etc/hosts.equiv' file on both servers. This is NOT the same as the '/etc/hosts' file. See the manapges for 'rhosts' --- "man 4 rhosts".

Regards!

...JRF...
diwa
Frequent Advisor

Re: rcp utility on HP Unix B.11.11 U 9000/800

Hi,

Thanks a lot i will check and revert back if problem still there.

Thanks
Aussan
Respected Contributor

Re: rcp utility on HP Unix B.11.11 U 9000/800

here is a good doc to look at
doc AUSRCKBRC00005144

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c01032593-2

in case the link does not work, here are the info

PROBLEM

I have configured a .rhosts file in my home directory, and am attempting to
run a command using remsh. The .rhosts is correct, as the following command
works:

# remsh host

However, when I attempt to run a command using remsh, it fails with the
following error:

# remsh host pwd
remshd: Login incorrect.

If I attempt to run the same remsh command as root, it works correctly.

RESOLUTION

The remshd command is the server for the remsh command. The man page for
remshd(1M) lists the following option:

-l Disallow authentication based on the user's .rhosts file
unless the user is a superuser.

Check to see whether the remsh entry in /etc/inetd.conf contains the -l
option (for example):

shell stream tcp nowait root /usr/lbin/remshd remshd -l

If so, then remove the -l entry (for example):

shell stream tcp nowait root /usr/lbin/remshd remshd

and tell inetd to reread the /etc/inetd.conf file:

inetd -c

Now the remshd command should work.
The tongue weighs practically nothing, but so few people can hold it
diwa
Frequent Advisor

Re: rcp utility on HP Unix B.11.11 U 9000/800

Thanks,

Yes i am not having root password. i checked file -l is not present. I think i need to use root user to execute the cmd.
I will let you know once done.

Thanks a lot.