LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-19-2005, 08:49 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Rep: Reputation: 31
scp: port 22: No route to host


Hi!

I started a ssh connection between my computer and a server. Everything works fine. Then I tried the comman scp to copy a file from the server to my computer, and got the following message:
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 181.140.98.70 [181.140.98.70] port 22.
debug1: connect to address 181.140.98.70 port 22: No route to host
ssh: connect to host 181.140.98.70 port 22: No route to host

Any suggestion? Thanks a lot.
 
Old 09-19-2005, 09:15 AM   #2
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 36
Hi there,
There are some options :
1) check out if there ia firewall in between. also first ping your own machine, your gateway, a machine outside your network and then a remote server. you can understand where the problem lies by this. perhaps a configuration in between is preventing your connection.
2) also please check your "/etc/ssh/ssh_config" file which is the client's file for ssh configuration. I think the problem is the configuration in "/etc/ssh/ssh_config". here just comment any lines with just the " Host " line. this should make it work most probably. if problems persists please post the errors again....
vimal.....
 
Old 09-19-2005, 01:40 PM   #3
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
the thing is that ssh works. I can connect to the server without any problem. I get problem as soon as I use scp although it uses port 22 too.
 
Old 12-09-2009, 10:24 AM   #4
vrnd
LQ Newbie
 
Registered: Dec 2009
Posts: 1

Rep: Reputation: 0
check your resolv.conf people!

I've had he same issue trying to scp files and folders from one linux machine over to another one on the same network.
Machine A had an externally accessible IP and machine B had a local network IP. so Machine A couldn't find the route to host B because it went searcing through my external gateway while machine A was using the internal gateway.

so, i gave machine A a fixed external IP as well and added my external gateway to the /etc/Resolv.conf. done! i can now scp/ssh with no problem.

Good luck everyone!

Last edited by vrnd; 12-09-2009 at 10:25 AM.
 
Old 10-22-2013, 09:58 PM   #5
dmerrell8
LQ Newbie
 
Registered: Oct 2013
Posts: 1

Rep: Reputation: Disabled
Exclamation Newbie response

I was stuck on this also. If in a non prod / lab environment, you can try the command "service iptables stop" and then try again. If scp or ssh works, the issue would seem to be in the iptables.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
route locally generated traffic to ip:port to localhost:port maenho Linux - Software 2 03-11-2005 04:08 AM
no route to host nerdboi Linux - Networking 9 02-08-2005 06:40 AM
no route to host PenguinHead Linux - Networking 9 02-02-2005 02:03 PM
Port 25: No route to host dhruv Linux - Networking 4 04-07-2004 08:23 AM
Port 25: No route to host dhruv Linux - Newbie 0 04-03-2004 09:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration