El ping funciona, ssh se agota

El ping funciona, ssh se agota

Tengo ubuntu 16.04 (mate) ejecutándose en mi computadora portátil (10.197.1.xx) y computadora de escritorio (10.141.200.xxx). Desde cualquiera de estos puedo hacer ping al otro. Pero el ssh vase acabó el tiempo(no rechaza la conexión, ni da ninguna advertencia o mensaje de error).

OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 10.197.1.xxx [10.197.1.xxx] port 22.
debug1: connect to address 10.197.1.xxx port 22: Connection timed out
ssh: connect to host 10.197.1.xxx port 22: Connection timed out

Tanto el PC como el portátil en cuestión tienenservidor opensshinstalado.

$ sudo service sshd status

● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab
   Active: active (running) since Mon 2017-04-10 09:59:50 IST; 4h 49min ago
  Process: 3682 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCES
 Main PID: 1096 (sshd)
   CGroup: /system.slice/ssh.service
           └─1096 /usr/sbin/sshd -D

Apr 10 10:37:18 H110M-DS2 systemd[1]: Reloading OpenBSD Secure Shell serve
Apr 10 10:37:18 H110M-DS2 sshd[1096]: Received SIGHUP; restarting.
Apr 10 10:37:18 H110M-DS2 systemd[1]: Reloaded OpenBSD Secure Shell server
Apr 10 10:37:18 H110M-DS2 sshd[1096]: Server listening on 0.0.0.0 port 22.
Apr 10 10:37:18 H110M-DS2 sshd[1096]: Server listening on :: port 22.
Apr 10 10:37:18 H110M-DS2 systemd[1]: Reloading OpenBSD Secure Shell serve
Apr 10 10:37:18 H110M-DS2 sshd[1096]: Received SIGHUP; restarting.
Apr 10 10:37:18 H110M-DS2 systemd[1]: Reloaded OpenBSD Secure Shell server
Apr 10 10:37:18 H110M-DS2 sshd[1096]: Server listening on 0.0.0.0 port 22.
Apr 10 10:37:18 H110M-DS2 sshd[1096]: Server listening on :: port 22.

El estado del cortafuegos esinactivo

sudo ufw status
Status: inactive

¿Qué podría estar mal? ¿Cómo hago que funcione el ssh?

ACTUALIZAR

El tracerouteprograma produjo el siguiente resultado

traceroute to 10.197.1.xxx (10.197.1.xxx), 30 hops max, 60 byte packets
 1  router.xxx.xxxx.xx.in (10.xxx.xxx.1)  1.069 ms  1.388 ms  1.691 ms
 2  10.xxx.xxx.1 (10.xxx.xxx.1)  0.820 ms  0.814 ms  0.974 ms
 3  172.xx.x.1 (172.xx.x.1)  0.371 ms  0.384 ms  0.375 ms
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

Respuesta1

sudo apt-get update
sudo apt-get install ssh
sudo ufw allow 22

Eso es lo mínimo. Permite intentos fallidos de contraseña ilimitados en un puerto conocido. El inicio de sesión directo como root está deshabilitado (aún puedes usar su y sudo una vez que hayas iniciado sesión). Si su nombre de usuario y contraseña son adivinables e Internet puede ver el servidor, eventualmente alguien entrará.

De forma predeterminada, el usuario root no puede realizar ssh desde afuera en ubuntu. puedes cambiar a

sudo sed -ir 's/^(PermitRootLogin) .+/\1 yes/' /etc/ssh/sshd_config
sudo /etc/init.d/ssh restart

Si aún tienes problemas, inténtalo.telnet machineip 22 Le mostrará que hay 22 puertos accesibles desde otra máquina. Intenta hacer que ssh sea seguro, sigue estoenlace

información relacionada