1

I have a master machine, connected to an slave with IP: 10.105.186.10

I ping that IP:

jcl023es@debian:~$ ping 10.105.186.10
PING 10.105.186.10 (10.105.186.10) 56(84) bytes of data.
64 bytes from 10.105.186.10: icmp_seq=1 ttl=109 time=211 ms
64 bytes from 10.105.186.10: icmp_seq=2 ttl=109 time=210 ms

I do ssh:

jcl023es@debian:~$ ssh -p23 root@10.105.186.10 -lroot
ssh: connect to host 10.105.186.10 port 23: No route to host

My IP config:

eth0      Link encap:Ethernet  HWaddr c8:9c:dc:b2:0b:47  
          inet addr:10.208.185.120  Bcast:10.208.185.255  Mask:255.255.254.0
          inet6 addr: fe80::ca9c:dcff:feb2:b47/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5873653 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2603300 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1565935198 (1.4 GiB)  TX bytes:1006274056 (959.6 MiB)

eth0:0    Link encap:Ethernet  HWaddr c8:9c:dc:b2:0b:47  
          inet addr:10.105.186.11  Bcast:10.105.186.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:3794 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3794 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:576227 (562.7 KiB)  TX bytes:576227 (562.7 KiB)

I don't understand how route table works. I have this:

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         10.208.185.252  0.0.0.0         UG        0 0          0 eth0
dhcp_sede_sur.l 10.208.185.252  255.255.255.255 UGH       0 0          0 eth0
10.105.186.0    *               255.255.255.0   U         0 0          0 eth0
10.208.184.0    *               255.255.254.0   U         0 0          0 eth0

So, what's the problem? Why can't I ssh my slave? I have direct wired connection...

Edit: To me, an interface is defined by its address, mask, and gateway. Soy I have these 3 known (the ones for my machine) and i know the slave's address. It seems it isn't enough to make my interface be in the same network as the slave's address to connect... Does the 'No route to host' message have something to do with thre routing table?

  • 2
    Why do you use -p23 ? TCP port 23 is reserved for telnet. It would be possible to run an ssh server on that port, but highly unusual. Also, you don't need to specify root twice. Use either root@10.105.186.10 or -l root 10.105.186.10, but not both. – user4556274 Sep 22 '16 at 15:40
  • 1
    Does this ssh command work locally on that host? – rudimeier Sep 22 '16 at 15:41
  • 1
    It might be useful to see your firewall rules, including the NAT table. – Julie Pelletier Sep 22 '16 at 17:20
  • ...the firewall rules on the machine you are trying to get connected! – Serge Sep 22 '16 at 21:54
  • These weren't the problems. I had to reinstall the slave machine, and i could connect with the same ssh command, just changing ip to the default one, which I already knew... Couldn't find what was happening. I know it wasn't firewall rules. – Joster Sep 23 '16 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.