4
I use SCP
command on Linux Debian to transfer a file to my colleague via LAN. But I encounter the problem:
$ scp filename.file username@10.0.0.109:/tmp
ssh: connect to host 10.0.0.109 port 22: No route to host
lost connection
But when I use the same command to transfer the file to a WAN machine, it works well.
And when I use ping
to ping WAN website, it works well, but when I ping a LAN ip address, it does not work.
$ ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
From 10.0.0.108 icmp_seq=1 Destination Host Unreachable
From 10.0.0.108 icmp_seq=2 Destination Host Unreachable
From 10.0.0.108 icmp_seq=3 Destination Host Unreachable
From 10.0.0.108 icmp_seq=4 Destination Host Unreachable
From 10.0.0.108 icmp_seq=5 Destination Host Unreachable
From 10.0.0.108 icmp_seq=6 Destination Host Unreachable
From 10.0.0.108 icmp_seq=7 Destination Host Unreachable
From 10.0.0.108 icmp_seq=8 Destination Host Unreachable
From 10.0.0.108 icmp_seq=9 Destination Host Unreachable
Routing table:
$ ip route
default via 10.0.0.1 dev wlan0 proto static
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.108
10.0.0.0/24 dev wlan0 proto kernel scope link src 10.0.0.108
169.254.0.0/16 dev eth0 scope link metric 1000
arp -an
root@debian:# arp -an
? (10.0.0.1) at c4:04:15:17:bd:66 [ether] on wlan0
iptables -L
root@debian:# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
I can explore the Internet via Firefox. It just can't connect the LAN machie.
And my ip address is static ip in my company's LAN.
The port 22 is open, and there seems nothing wrong with iptables and SSH works well too.
How can I fix it?
$ ip route
default via 10.0.0.1 dev wlan0 proto static
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.108
10.0.0.0/24 dev wlan0 proto kernel scope link src 10.0.0.108
169.254.0.0/16 dev eth0 scope link metric 1000
– GoingMyWay – 2015-08-06T05:02:08.407The above are the
ip route
result,arp -an
andiptables -L
those two commands are not found on my Debian Linux. – GoingMyWay – 2015-08-06T05:04:08.403You probably need to run
sudo
for the other two commands. Please can you disable either wireless or lan whilst doing this? You currently have two active network connections. Please [edit] your question to ad additional information. – Paul – 2015-08-06T07:28:45.940Did you try disabling one of the interfaces? – Paul – 2015-08-06T08:08:04.327
I disabled eth0 by using the command
# ifconfig eth0 inet down
, and it can transfer file to my colleague. Thank you for your help ^_^ – GoingMyWay – 2015-08-06T08:20:36.390$ ip route
default via 10.0.0.1 dev wlan0 proto static
10.0.0.0/24 dev wlan0 proto kernel scope link src 10.0.0.108
The eth0 is not on ip route list now. – GoingMyWay – 2015-08-06T08:30:37.563