1830899 Members
2583 Online
110017 Solutions
New Discussion

Re: problem with rcp

 
Vivek Shrivastava_1
Frequent Advisor

problem with rcp

Hi,

I getting following message if i try to run rcp.

# rcp -rp ./myfile myserver:/root/backup/scripts/

remshd: Login incorrect.

but if i try from other unix box it works fine.

rcp -rp cfxt600:/root/backup/scripts/runbackup .

what could be the reason?

help please.

thanks



13 REPLIES 13
Pete Randall
Outstanding Contributor

Re: problem with rcp

Either the ~/.rhost or the /etc/hosts.equiv file on the other system needs to have your local host added to it.


Pete

Pete
Vivek Shrivastava_1
Frequent Advisor

Re: problem with rcp

I have entry in .rhosts file on both the boxes.

.rhosts on server A
B root

.rhosts on server B
A root

what else could be the reason?

Pete Randall
Outstanding Contributor

Re: problem with rcp

Forgive me for asking, but are you running this as root?


Pete

Pete
Vivek Shrivastava_1
Frequent Advisor

Re: problem with rcp

YES.
Steven E. Protter
Exalted Contributor

Re: problem with rcp

other possible causes.

if you have hostnames and not ip addresses in .rhosts, and DNS is wrong for one server, rcp will fail.

/etc/hosts.equiv might not authorize rcp on the affected server.

the r- protocols may be disabled in /etc/inetd.conf

They may be blocked in /var/adm/inetd.sec


Diags:
On the target server inetd -l to turn on enhanced logging if its not already on.

tail -f /var/adm/syslog/syslog.log

Then rcp in. Note the message if any.

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
RAC_1
Honored Contributor

Re: problem with rcp

Root does not check /etc/hosts.equiv file for remsh/rcp/rlogin.

From host A, telnet to B, login with root user_id. Do who -u, What does last column shows, Does that entry is in B host's .rhost file??

Anil
There is no substitute to HARDWORK
Victor Fridyev
Honored Contributor

Re: problem with rcp

Hi,

I guess, you use DNS or NIS on your computers. Run
nslookup myserver
on the target machine. You'll get something like this:
myserver.YOURDOMAIN

Put the answer into /.rhost on target machine

HTH
Entities are not to be multiplied beyond necessity - RTFM
KapilRaj
Honored Contributor

Re: problem with rcp

i would, if i am to , rcp from A to B.

on A, ftp B &
on B ; netstat -a |grep ftp
this would show me exactly what hostname / ip is being used by system A to connect to System B. Add this name in the .rhosts of System B and you are done.

Regds,

Kaps
Nothing is impossible
Donny Jekels
Respected Contributor

Re: problem with rcp

you should really think about using scp instead. and have your ssh keys installed.
"Vision, is the art of seeing the invisible"
Muthukumar_5
Honored Contributor

Re: problem with rcp

Hai,

Problem may be because of .rhosts entries. Put nslookup A or nslookup B entries (FQDN) in .rhosts file

Check that with remsh hostname
If you want a simplified .rhosts file then
make as like this,
# cat /.rhosts
+
#chmod 400 /.rhosts

All machines will be having the access to that machines.

Regards,
Muthukumar
Easy to suggest when don't know about the problem!
Mohanasundaram_1
Honored Contributor

Re: problem with rcp

Hi,

If you had tried all the options indicated earlier and still have a problem then check the below 2 points.

1. If you configured 2 LAN cards with an IP in the same Subnet, rlogin does not work. 2 LAN cards in same Subnet is not supported in HP-UX. to confirm, delete the IP on the second LAN card where you are having rlogin problem and check rlogin.

2. .rhosts does not support alias names. It has to be only the OFFICIAL HOSTNAME in it. If you had used alias name, modify it and check.

Cheers,
Mohan.
Attitude, Not aptitude, determines your altitude
Vivek Shrivastava_1
Frequent Advisor

Re: problem with rcp

Hi,

Because of security reason ftp is not available across the system. I am not able to try all the suggestion. I will keep you guys updated as soon as I solve this problem with the help of you guys.

I will be assigning the points.

Thanks

John Kittel
Trusted Contributor

Re: problem with rcp

make sure .rhosts is really in the root acct's home dir. ( for example many people have root acct home dir = something like /root. If .rhosts is in /, then rcp won't work.)

- John