[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Using RCP on two Sun servers.

Posted on 2004-10-26
24
Medium Priority
?
662 Views
Last Modified: 2013-12-27
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.
0
Comment
Question by:gsalcedo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 8
  • 4
  • +1
24 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 12415550
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
 
LVL 2

Expert Comment

by:Matt_Avery
ID: 12415783
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
 
LVL 48

Expert Comment

by:Tintin
ID: 12415788
And depending on your purposes, rsync may well be a more suitable tool.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 12418721
> .. rsync may well be a more suitable tool
.. which is on top of rcp/scp, usually ;-)
0
 

Author Comment

by:gsalcedo
ID: 12463680
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 12468055
what does ping and nslookup return on either server when querying the other one?
0
 

Author Comment

by:gsalcedo
ID: 12468195
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
 
LVL 48

Expert Comment

by:Tintin
ID: 12469191
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 12471045
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
 

Author Comment

by:gsalcedo
ID: 12472819
Thank you for your advices.  I will give it a try.  
0
 

Author Comment

by:gsalcedo
ID: 12473055
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
 
LVL 51

Expert Comment

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

Author Comment

by:gsalcedo
ID: 12475600
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 12482407
please post your hosts.* files
   cat /etc/hosts.* ~/.rhosts
0
 

Author Comment

by:gsalcedo
ID: 12483961
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 12484811
+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
 

Author Comment

by:gsalcedo
ID: 12484911
Thank you ahoffmann..  I will look into that.
0
 

Author Comment

by:gsalcedo
ID: 12485139
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
 
LVL 48

Expert Comment

by:Tintin
ID: 12486486
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
 

Author Comment

by:gsalcedo
ID: 12486987
I do use ssh, but what is the command that I have to use to copy files from one server to another?
0
 

Author Comment

by:gsalcedo
ID: 12487109
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
 
LVL 48

Expert Comment

by:Tintin
ID: 12488696
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
 
LVL 51

Accepted Solution

by:
ahoffmann earned 400 total points
ID: 12491986
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
 

Author Comment

by:gsalcedo
ID: 12493882
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question