Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote copy between Red Hat Linux Servers

Status
Not open for further replies.

ejmilne

Technical User
Apr 23, 2003
37
GB
Hello,
I have 2 Red Hat Enterprise v4 linux servers, I am trying to do an rcp (remote copy) between them, and I am getting a "No route to host" error.
Does anyone know of a way around this?
Thanks, Emma
 
Hello Emma,

No route to host does not have any "way around". You have to make sure that your local machine has a functional connection in order to reach the remote one.

First option, check you network settings; Can you ping the remote pc?
If you can only ping using a IP address, your local machine may not be resolving DNS queries correctly.

If you are not resolving queries properly, set correct DNS server's address in your /etc/resolv.conf file.


Cheers

QatQat

Life is what happens when you are making other plans.
 
Hi mbrooks,

Also scp and rsync need to have a functional and correctly resolving DNS setup.

Cheers

QatQat



Life is what happens when you are making other plans.
 
QatQat, I believe your statement is untrue.
scp/ssh are capable of functioning using IP addresses for hosts instead of hostnames. Further, I believe that rsync can cope without DNS as well.

I do agree with all that there are scant few reasons anymore to use 'rcp', 'rsh', etc.

D.E.R. Management - IT Project Management Consulting
 
You use scp like this
Code:
scp [b]<files>[/b] [i]user[/i]@[i]ip[/i]:/path/to/home
or as in
Code:
scp backup.tar.gz mbrooks@192.168.0.100:/home/users/mbrooks

M. Brooks
 
Hi Thedaver,


on public networks and not LAN, remembering IPs may not be th easiest thing, and the error emma has been picking up is usually associated with unresolved DNS.


Cheers

QatQat

Life is what happens when you are making other plans.
 
ejmilne said:
...and I am getting a "No route to host" error.

Means, at least to me, the host cannot find a route to the host. If she said she was getting "Unknown host" as an error then I might be inclinded to suspect a DNS issue.

ejmilne.: Issue the following two commands.

[tt]host <Name of Server>[/tt]

You should have gotten an IP address. Then use the address returned.

[tt]ping <IP.of.the.server>[/tt]

You should have the "No route to host" error.

If the above holds true verify your routing table and default gateway settings are correct.
 
on public networks and not LAN, remembering IPs may not be th easiest thing
That all depends, my remote servers have static ip's, and there are only two of them. If the OP's remote server has a static ip then he/she could just write a shell script and schedule it to run automatically.

Getting back on topic,
- First make sure both servers have either internet or network access (which depends on if they're both on your lan, or if one is off site)
- Once you've verified that both servers can access the network/web, follow IRudebwoy's advice and have the machines try to ping one another.
- Once they can ping eachother by ip address, you can use scp to copy your files. Instructions on how to do that are in mybrooks' post
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top