Using RCP on two Sun servers.

Hi,

Can someone assist me with what I need to configure and two Sun servers to allow me to remotely copy (rcp) files from one Sun server to another?

Thank you.
gsalcedoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ahoffmannCommented:
rsh/rcp are installed and configured by default on Sun, usually.
What's your problem actually.

BTW, I'd recommend to use ssh/scp instead of rsh/rcp for security reasons
0
Matt_AveryCommented:
You need to configure the "/etc/hosts.equiv" file (for systemwide configuration) or "$HOME/.rhosts" file (for per-user configuration) on the remote host.

The simplest setup would have the "/etc/hosts.equiv" on "server1" containing a single line that says "server2" and vice versa (where "server1" and "server2" are the hostnames of your two machines).

Note that things begin to get complicated if you don't have the same usernames on both machines. See "man hosts.equiv" for more details.

I'd agree with ahoffman that the "scp" utility that comes bundled with SSH is a more secure option. Only use "rcp" on a completely trusted network.

 
0
TintinCommented:
And depending on your purposes, rsync may well be a more suitable tool.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

ahoffmannCommented:
> .. rsync may well be a more suitable tool
.. which is on top of rcp/scp, usually ;-)
0
gsalcedoAuthor Commented:
Hi Matt,

The environment that I am working in is a fully secured environment in which none of the servers are allowed to go to non-secured network environment.  I am trying to use rcp and have edited the .rhosts file, but I can not remotely copy any files from server 1 to server 2 or visa versa.  In server 1's .rhosts file, I have indicated server 2's FQDN and did the same for server 2's .rhosts file with server 1's FQDN.  Is there anything else that I have configure or edit?

Thank you in advance.
0
ahoffmannCommented:
what does ping and nslookup return on either server when querying the other one?
0
gsalcedoAuthor Commented:
Hi ahoffmann,

Both servers are able to run nslookup on each other without any difference.  As for ping, I am able to ping each other, but the only difference is server 1 would just give me a host name as being alive (server 2 is alive).  When I would ping server 1 via server 2, it would give me FQDN is alive (server 1.domain_name.com is alive).


Thank you for your help.
0
TintinCommented:
And that's probably your problem.

Your host entries in the .rhosts file need to match the name of what the machine thinks it is.  A lot of people specify the hostname and the FQDN to be safe.
0
ahoffmannCommented:
Tintin said what I had in mind ;-)
simply add both entries in your .rhosts file
   server1
   FQDN-of-server1
same for server2
In long term you better setup a proper DNS and /etc/hosts, which is the basics for " is a fully secured environment i", somehow ...
0
gsalcedoAuthor Commented:
Thank you for your advices.  I will give it a try.  
0
gsalcedoAuthor Commented:
Hi Tintin and ahoffmann,

I have edited and checked the .rhosts and the /etc/hosts files on both servers and ran a rcp test, but it still does not work.  I have added a host name and FQDN on the .rhosts file of both servers and added the IP, FQDN and host name on the /etc/hosts file of both of the servers.  Server 1 would have Server 2 info and Server 2 would have Server 1 info.  I have checked the DNS server and their entries have been indicated in the db.*** and the reverse lookup.  There must be something that I am missing.  The error that I would receive whenever I would run a rcp test from Server 2 to Server 1 is "Server 1: Connection refused."  I feel that I am missing something on the servers' configurations.  Do you happen to have any clue on what it might be?

Thank you.
0
ahoffmannCommented:
> /etc/hosts  ??
that's out of question here, you need to adapt /etc/hosts.equiv and/or (depending on your configuration) ~/.rhosts
0
gsalcedoAuthor Commented:
Hi ahoffmann,

Previously, I was using two files (hosts.allow and hosts.deny) to represent the hosts.equiv file.  I have created the hosts.equiv file on both of the serves (Server 1 and Server 2) and written the appropriate line for that file ( +server 2.domain.com on Server 1 and +server 1.domain.com on Server 2).  After checking the .rhosts and hosts.equiv files on both of the servers, I have tried to run a rcp command on Server 2 (rcp server 1:/opt/file /tmp/) and it still would give out a error message (server 1: Connection refused).
0
ahoffmannCommented:
please post your hosts.* files
   cat /etc/hosts.* ~/.rhosts
0
gsalcedoAuthor Commented:
Hi ahoffman,

Since the environment that I work in is a secure environment, I am not allowed to hand that information out.  I can give you an example of what is contained in the /etc/hosts.equiv and .rhosts files for the two servers.

On Server_1, here is the information that I got from cat /etc/hosts.equiv ~/.rhosts
+server_2.abc.com    root

server_2    root


On Server_2, here is the information that I got from cat /etc/hosts.equiv ~/.rhosts
+server_1.abc.com    root

server_1    root

0
ahoffmannCommented:
+server_2.abc.com    root

AFAIK this is wrong syntax, needs to be:

server_2.abc.com    root

Also did you check /etc/default/login, following line should be disabled

CONSOLE=/dev/console
0
gsalcedoAuthor Commented:
Thank you ahoffmann..  I will look into that.
0
gsalcedoAuthor Commented:
Hi ahoffmann,

I have commented out (disabled) the line CONSOLE=/dev/console and removed the "+" from the /etc/hosts.equiv of both servers (server_1 and server_2), but I would still receive the message, server_1: Connection refused, on server_2.
0
TintinCommented:
gsalcedo.

Given that you are in a "secure" environment, why don't you use ssh (as previously suggested)?  Does your "secure" environment prevent you from using secure protocols?
0
gsalcedoAuthor Commented:
I do use ssh, but what is the command that I have to use to copy files from one server to another?
0
gsalcedoAuthor Commented:
I know that you have mentioned about "scp" and "sftp".  Isn't it software that I have to install that does not come as a default with the Solaris OS?  If I do have to install the scp or sftp, then there is an issue.  One of the server Server_2 is at a remote site that I would have to either ask another administrator to approve the download and installation or go across the country to install it myself.  If scp or sftp does come as a default, what would the process be to configure it to be utilize?

Thank you.
0
TintinCommented:
Ahh.  Progress.

I thought it would be very retrograde step to use something as insecure as rcp in a secure environment.

If you have ssh, then you will have scp.  ssh comes standard with Solaris >=9

I guess the issue is if it is installed on the remote site.  If it needs to be installed, wouldn't that be a much better option than using a insecure transfer mechanism?
0
ahoffmannCommented:
to complete the ssh discussions:
  ssh comes with scp and sftp
 ssh is a replacement of rlogin and rsh, and scp for rcp, both with same syntax as rsh and rcp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gsalcedoAuthor Commented:
Hi ahoffmann and Tintin,

I really appreciate your help.  The reason why I did not want to go through the route of using the scp or sftp is because I did not want to ask someone install the application or go to the offsite location to install it myself.  There is just a lot of political approvals that I have to go through to have a software installed.  Also, I did not know that scp and sftp came with ssh.  When I tried to do a "man" on scp and sftp on my Solaris systems, I would get a "No manual entry" response.  So, I just used the scp command in replacement of rcp and it worked.  Thank you very much.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.