1824218 Members
3755 Online
109669 Solutions
New Discussion юеВ

allow rcp

 
SOLVED
Go to solution
O'lnes
Regular Advisor

allow rcp

I want to allow the unix machine to rcp file to linux machine.

I have modified the /etc/hosts and the /.rhosts as
"unix_hostname root", but it still not work, what file that I need to modify?
Thanks
Andy
13 REPLIES 13
O'lnes
Regular Advisor

Re: allow rcp

Now, I can ping between both machine, but can't run rcp, remsh, rlogin, can someone suggest? Thanks.
Andy
Sridhar Bhaskarla
Honored Contributor
Solution

Re: allow rcp

Hi,

It should be the home directory (not necessarily /, it could be /root or /home/root depending on how the root's home is setup on the linux system).

I suppose you are trying to do rcp as "root" from unix machine to linux machine.

Logon to the linux machine as root. Do a "cd $HOME" and edit .rhosts and add the entry as you specified.

Make sure the IP address of the unix system is correctly resolved on the linux server.

Also, look at hosts.equiv file and make sure there are no "-" entries.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: allow rcp

Hi (again),

Looking at your second message, it appears to me like you are not able to connect to the linux system at all.

Are you getting "connection refused" messages or "login incorrect" message?.

If it is the first case, then you will need to check your firewalls to see if they are disallowing any tcp ports. If not, then the linux system might be configured with tcp_wrappers that denies access to your host.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
O'lnes
Regular Advisor

Re: allow rcp

I make sure the host name is correct cos i can ping the host, there is no /etc/hosts.equiv in our system, I have created one. where I run rcp then no error message pop up.
Andy
O'lnes
Regular Advisor

Re: allow rcp

Even i set the /.rhosts as "+ root" , it still can't run rcp, can someone suggest? Thanks.
Andy
Patrick Chim
Trusted Contributor

Re: allow rcp

Hi,

You have to locate the .rhosts file in the root's home diretory, i.e. ~root and add the entry

root

Of course, you have to add the unix server IP address in /etc/hosts.

I have set all this and I work with my RedHat and HP-UX server.

Regards,
Patrick
Justo Exposito
Esteemed Contributor

Re: allow rcp

Hi,

Do you try to do a rlogin to the linux machine?

Regards,

Justo.
Help is a Beatiful word
O'lnes
Regular Advisor

Re: allow rcp

I have check the /etc/hosts, I sure it is OK cos i can ping by the host name, the .rhosts file in linux side is "unix_hostname root", but it still not work.
The rlogin is not work also.
Andy
sven verhaegen
Respected Contributor

Re: allow rcp

the simplest of tests exist in rcp-ing and rlogin-ing to your own machine .. if that works your are sure of the functionality of the commands , then I'd try this on the Linux rcp and rlogin to itself and see if that works .. are you sure the deamons for these 2 functions are running on the Linux?? , are you sure there is no security file on the Linux that refuses you access .. most of the things you tell me here point towards the linux having IP capability but just not replying to certain request types , in general that is because either the deamons for these feature do not run or are shielded/protected from access , I'd look that direction if I had to investigate this one
...knowing one ignores a greath many things is the first step to wisdom...
O'lnes
Regular Advisor

Re: allow rcp

hi sven verhaegen,
you said the daemons are shielded/protected from access, how to check it? Thanks.
Andy
Frank Slootweg
Honored Contributor

Re: allow rcp

See the other recent thread about rcp (<>) and my response in that thread.

Bottom line: Start simple, *one* command (r[em]sh(1)) on *one* system, *to itself*. Only when *that* works, make it bigger, i.e. two systems, but still "r[em]sh host date". When *that* works, ...
Judy Traynor
Valued Contributor

Re: allow rcp

For rcp look at the following files.

.rhosts - you have correctly identified.
/etc/hosts.equiv.
/etc/hosts (make sure the host NAMES in .rhosts exist in /etc/hosts (or in nis - via ypcat hosts| grep NAME) and they match)
/etc/netgroups - if you are using netgroups, and you want to define a group like sales, to be multiple machines.

More about .rhosts - note that .rhosts is looked for in $HOME, so if you changed your root $HOME to be /home/root, or something, then copy or link your .rhosts to that area. Same for users. if you have a /users/jones, and you want them to be able to rcp, you need to verify that the .rhosts exits there (this can be overridden by netgroups)


Sail With the Wind
sven verhaegen
Respected Contributor

Re: allow rcp

hello

sorry , I missed the message yesterday .. what I mean by security in fact holds a huge range of possible culprits , going from a router with filetering capabilities over a switch or firewall/proxy setup that handles all data before transmitting it up till software on th elinux itself .. i'm unfortunately no linux guy so I don't know the equivalent on linux but i talk about things like inetd.sec on hp-ux exffectively deniein acces to services for certain IP's and ranges , that is why I stipulated to test first locally on both the linux and hp if they can do all the function onto themselfs if that works there is probably some external cause , that could even be a firewall software running on the linux box
...knowing one ignores a greath many things is the first step to wisdom...