1833178 Members
3027 Online
110051 Solutions
New Discussion

Re: can't rcp file

 
peterchu
Super Advisor

can't rcp file

I hv a file want to rcp from host A to host B ,
I tried a user can do that , but root user can't , could advise except update /.rhosts at host B , how to let root user can rcp file from host A to host B ? thx
7 REPLIES 7
Geoff Wild
Honored Contributor

Re: can't rcp file

Check permissions of .rhosts for root as root:
ll ~root/.rhosts

Should be:

-rw------- 1 root sys

Do you have a /var/adm/inetd.sec file?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Eknath
Trusted Contributor

Re: can't rcp file

Hi peter,

Check man page of hosts.equiv...

here is some abstracts
The /etc/hosts.equiv file and files named .rhosts found in users' home
directories specify remote hosts and users that are "equivalent" to the local host or user. Users from equivalent remote hosts are permitted to access a local account using rcp or remsh.

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

[hostname [username]] [#comment]

Cheers!!!
eknath
Muthukumar_5
Honored Contributor

Re: can't rcp file

Are you having /.rhosts file with root:root group id 600 permission there?

Host A:

$root home /.rhosts
hostb root

Host B:
$root home /.rhosts
hosta root

Do you have anything in /etc/hosts.equiv file? check is it working or not.

hth.
Easy to suggest when don't know about the problem!
Suraj Singh_1
Trusted Contributor

Re: can't rcp file

Hi,

What exactly is the error message thrown when running rcp by root user?
With the details given, i would suspect .rhosts file of root user..

check ~root/.rhosts (permission 600) file for the correct entries:
host_A
======
host_B root

host_B
======
host_A root

Regards
What we cannot speak about we must pass over in silence.
renarios
Trusted Contributor

Re: can't rcp file

Hi,

Do you have you hosts in secure mode?
Take a glance at http://www.atmos.albany.edu/facstaff/rmctc/ssh2 where it will be explained clearly what to do.

Cheers,

Renarios
Nothing is more successfull as failure
Steven E. Protter
Exalted Contributor

Re: can't rcp file

all the rhosts file needs to have it it is the hostname.

rcp will fail if the hostname is in .rhosts and name resolution can not occur from /etc/hosts or DNS.

In that case you may wish to try the ip address of the server.

There are many things that can block rcp
* firewall port based block.
* host.equiv entries prohibiting the protocol
* network connectivity.
* failed lan card
* failed lan cable
* incorrect switch port configuration.
* permissions on the .rhosts file.

On host B
tail -f /var/adm/syslog/syslog.log

try the rcp from host A to host B

If there is no log entry, then its networking, if there is respond to the error or post it here.



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
Cem Tugrul
Esteemed Contributor

Re: can't rcp file

i am also agree with SEP...
Good luck,
Our greatest duty in this life is to help others. And please, if you can't