Operating System - Linux
1830136 Members
2441 Online
109999 Solutions
New Discussion

When I use rcp permission denied

 
Kevin_peng
Advisor

When I use rcp permission denied

My RHEL version AS4.0 update3,When I use rcp command to remote copy file,it will show error mesaage.My login account is root,and I don't want use other command.What's problem with it.
3 REPLIES 3
g33k
Valued Contributor

Re: When I use rcp permission denied

firts of all check that you have rigths to execute rcp.
then check you .rhost file on target system...

anyway rcommands are NOT SECURE, actually it's big hole in security

I would radder use scp with combinations with keys(privite public), to have secure and easy way to copy files
Alexander Chuzhoy
Honored Contributor

Re: When I use rcp permission denied

The .rhosts file must reside in root's directory on remote system and it has to list the name of your station in it.

Also check that you're able to reach your station from that remote station by its name.
Andrew Bruce
Valued Contributor

Re: When I use rcp permission denied

On the target machine, log in as root. Edit the .rhosts file located in root's home directory and make sure that either the hostname of the source machine, or the IP address is present as an entry.

Bear in mind, the hostname entry must be the one that resolves to the source machine's IP address, as it is resolved locally on the target machine.

In other words, if the target machine resolves the hostname in the /etc/hosts file, then use *that* hostname for the source machine.

Ultimately, rcp is insecure, it is relatively straightforward to abuse. If your server is on a network open to access by others, you really shouldn't have any r* commands turned on (rlogin, rcp, rsh).

It is *much* better (and easier) to set up ssh and use that instead.

You can:

ssh login (instead of rlogin)
ssh command (instead of rsh)
scp (instead of rcp)
sftp (instead of ftp)

If you don't want to use passwords, you can use encryption keys (so long as the accounts you use can't be used by others). That way you can login without bothering with passwords...

Regards,

Andy Bruce

What do points make?
....Prizes!
I Love it when a plan comes together!