Operating System - HP-UX
1822018 Members
3825 Online
109639 Solutions
New Discussion юеВ

Re: allow rcp from any machine

 
andi_1
Frequent Advisor

allow rcp from any machine

Hi guys,

How can I allow rcp files from my sever from any machine?

Basically, I want to write a program that will be given to different users, and when those users will execute it, they can perform rcp on my server?

Thank you!
10 REPLIES 10
Luc Bussieres_1
Trusted Contributor

Re: allow rcp from any machine

Hi,

I'm not sure exactly what you want to do, but to allow an rcp connection will allow in the same time an rlogin connection without a password from any servers. So it will become really insecure for your system since anybody will be able to use it without a password

Luc
John Bolene
Honored Contributor

Re: allow rcp from any machine

For rcp to work, the machine must be trusted.

To be trusted means that you need to put the machine's DNS name in the .rhosts file for that user.

No program needed, just entries in the .rhosts file.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Sachin Patel
Honored Contributor

Re: allow rcp from any machine

Hi Lz,

rcp file from any machine to your system?

add every systems name in to your /.rhosts file.

Or add + in /etc/hosts.equiv file and /.rhosts file. so everyone can run rcommand to this system.

#man remsh

Sachin
Is photography a hobby or another way to spend $
S.K. Chan
Honored Contributor

Re: allow rcp from any machine

The safer and better (in my opinion) is to created .rhosts file in each user's home directory that need to perform the rcp to your server. Example .. (my .rhosts file) entry ..

mars skchan
mars skchan.abc.com

That allows me to run the "r" commands on mars. Provided of course mars can authenticate me as "skchan".

Another option is /etc/hosts.equiv file that you can create on the server but I would not want to use that (security reasons). Do a man on "hosts.equiv" for details.
Helen French
Honored Contributor

Re: allow rcp from any machine

Two files to look at:

1) $HOME/.rhosts - this will give access to the specified hosts for this particular user

2) /etc/hosts.equiv - global for any user, giving access to remote systems specifed. Remember the security hole!

# man hosts.equiv ( for more details)
Life is a promise, fulfill it!
MANOJ SRIVASTAVA
Honored Contributor

Re: allow rcp from any machine

Hi Lz

All the issues revolve around gining permission to the user , in case you want you can hard wired ther previleges by setting up the user name in .rhosts the $HOME for that user. This will enable the user to rcp the files . The way to check is to do login as a user and do a rlogin to the the other machine , if the system prompts for a passwd then the rcp will also not work , incase the system doesnt ask for passwd then the user can doa rcp.


Manoj Srivastava
Deshpande Prashant
Honored Contributor

Re: allow rcp from any machine

Hi
The username entry in .rhosts file or /etc/hosts.equiv file will help you rcp between machines without passwords.

Thanks.
Prashant.
Take it as it comes.
andi_1
Frequent Advisor

Re: allow rcp from any machine

For this part, I don't care about security. Basically, I want internal users of my software, pickup new bits from my machine just running a script.

I don't know all the machine names they will be coming from, and thats why I'd like to open my machine to every other machine.

Thanks a lot!
Steven Sim Kok Leong
Honored Contributor

Re: allow rcp from any machine

Hi,

Put this in the /etc/hosts.equiv:

# cat /etc/hosts.equiv
+

If you are only allowing to a specific user account, put this in $HOME/.rhosts of that user:

# cat $HOME/.rhosts
+ +

Note, for security reasons, this should not be implemented except for pure testing purposes with non-sensitive and non-critical data and systems.

Hope this helps. Regards.

Steven Sim Kok Leong
Jack Werner
Frequent Advisor

Re: allow rcp from any machine

A quick and simple test for r-cmds is; on the user's system issue the following;
"remsh date"

If the current date is returned, rcp should work OK. If you get an error message, more configuration work is required.

As the Oracle DBA at our site, I put "+ oracle" in each Oracle server's ~oracle/.rhosts file. This allows me(logged in as user "oracle") to rcp files to/from any of our Oracle servers.
i'm retired