Ssh: Nenhuma rota para hospedar

0

Eu tenho dois laptops com o Ubuntu 14.04 LTS. Eu conectei os dois à mesma rede sem fio.Agora eu instalei o servidor ssh no Ubuntu.Now eu estou tentando acessar o desktop de outro laptop (digamos B), mas o erro está vindo como

    Ssh:connect to host 192.168.0.102 port 22: No route to host

Estou usando o seguinte comando

    ssh [email protected]

A seguir, a saída para ifconfig

     eth0      Link encap:Ethernet  HWaddr 28:92:4a:1e:eb:ed  
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

     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:614 errors:0 dropped:0 overruns:0 frame:0
      TX packets:614 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:53218 (53.2 KB)  TX bytes:53218 (53.2 KB)

      wlan0     Link encap:Ethernet  HWaddr 08:3e:8e:0e:4f:4b  
      inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::a3e:8eff:fe0e:4f4b/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:1412 errors:0 dropped:0 overruns:0 frame:13931
      TX packets:1931 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:557138 (557.1 KB)  TX bytes:240606 (240.6 KB)
      Interrupt:17 

O seguinte acontece quando faço ping

      PING 192.168.0.102 (192.168.0.102) 56(84) bytes of data.
      From 192.168.0.100 icmp_seq=9 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=10 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=11 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=12 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=13 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=14 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=15 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=16 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=17 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=18 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=19 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=20 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=21 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=22 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=23 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=24 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=25 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=26 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=27 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=28 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=29 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=30 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=31 Destination Host Unreachable
      From 192.168.0.100 icmp_seq=32 Destination Host Unreachable
      and so on.....

Saída do netstat -rn

      Kernel IP routing table
      Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
      0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 wlan0
      192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0
    
por vipin megotia 06.04.2016 / 11:01

1 resposta

0

Talvez você precise desativar o firewall ... Você pode verificar se o ssh-server está trabalhando e ouvindo a rede usando o nmap (é necessário instalá-lo primeiro):

apt-get install nmap -y

nmap -p22 192.168.0.102

Você precisa ver algo como isso que indica que a porta 22 (porta ssh) está aberta:

root@srkv12b3:/home/monitor# nmap  -p22 192.168.19.4
Starting Nmap 7.01 ( https://nmap.org ) at 2016-04-06 11:08 CEST
Nmap scan report for 192.168.19.4
Host is up (0.000033s latency).
PORT   STATE SERVICE
22/tcp open  ssh

Nmap done: 1 IP address (1 host up) scanned in 5.79 seconds
    
por monitor35 06.04.2016 / 11:11