Stumped which direction to troubleshoot......

Server1 can ssh out to any computer but no other computer can ssh to Server1. Even if Server1 ssh to Server2 -> Server2 can not ssh back through same open ssh port to Server1.

Server1 can ssh to Server3 then through ssh tunnel ssh to Server2


Why can Server1 tunnel to Server3 through Server2 but not through Server3 back to Server1?

If connected by crossover cable Server1 can directly connect to Server2 but tunnel back to Server1 from Server2 is not possible.


if connected to router

# ssh
# ssh: connect to host port 22: Connection refused
# nc 22   (does not connect)
# nc -l 22  (on
# nc: Address already in use




Firewall disabled for testing. IP table accept all. Suspect mis-configured routing table....

Server1 Kernel IP routing table

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 wlan0   U     0      0        0 wlan0   U     0      0        0 eth0   U     0      0        0 eth0

edit: reviewed old working saved " # route -n " outputs, metric for (the subnet of the servers) is 100 . Is it possible the metric setting displayed by route -n prevent ssh tunneling?


# tcpdump -c 25 -i eth0 -v 
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
19:19:37.121131 IP (tos 0x10, ttl 64, id 19952, offset 0, flags [DF], proto TCP (6), length 176)
    homie.ssh > Flags [P.], cksum 0x89fb (incorrect -> 0xecf8), seq 3089869718:3089869842, ack 4078834853, win 271, options [nop,nop,TS val 11868537 ecr 3677449774], length 124
19:19:37.121627 IP (tos 0x10, ttl 64, id 22362, offset 0, flags [DF], proto TCP (6), length 52) > homie.ssh: Flags [.], cksum 0x8577 (correct), ack 124, win 501, options [nop,nop,TS val 3677449895 ecr 11868537], length 0
19:19:37.135066 IP (tos 0x10, ttl 64, id 19953, offset 0, flags [DF], proto TCP (6), length 184)
    homie.ssh > Flags [P.], cksum 0x8a03 (incorrect -> 0xe8ff), seq 124:256, ack 1, win 271, options [nop,nop,TS val 11868540 ecr 3677449895], length 132
19:19:37.135254 IP (tos 0x0, ttl 64, id 37912, offset 0, flags [DF], proto UDP (17), length 70)
    homie.57077 > gateway.domain: 17930+ PTR? (42)
19:19:37.135317 IP (tos 0x10, ttl 64, id 22363, offset 0, flags [DF], proto TCP (6), length 52)
  • Have you confirmed that sshd is running on Server1? Can you ssh localhost?
    – B. Morris
    Commented Nov 17, 2020 at 6:07
  • # ssh localhost (does work) sshd is running and ports are open in /etc/ssh/sshd_config
    – debdragon
    Commented Nov 17, 2020 at 19:03
  • What is the output of firewall-cmd --list-all, and what account are you trying to use to log in with?
    – cutrightjm
    Commented Nov 18, 2020 at 4:56
  • yes @cutrightjm firewalls were fine - dropped firewall to test but re-enabled and all packets arrived as expected. thanx
    – debdragon
    Commented Nov 30, 2020 at 6:10

1 Answer 1


routes   U     0      0        0 wlan0   U     0      0        0 eth0   U     0      0        0 eth0
  1. can't have same subnet with two different netmasks

  2. If two different subnets both point to same gateway traffic bond for internal gw will get 'lost'

    # sudo route del -net gw netmask dev eth0

try now to use both networks separately. route is auto-generated so it "may" work by itself. if not, add route manually to remote ip (server), does not seem to work, maybe someone can explain why....

`# route add -net netmask gw eth0'

took a number of days to figure out the issue so posting here for my reference and maybe it will help someone with a similar problem looking for troubleshooting steps for ping but no ssh.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .