Cannot connect remotely using ssh

Instead of turning off your firewall completely, you could instead configure UFW to allow your SSH traffic: sudo ufw allow ssh or if you decide to run SSH on a different port: sudo ufw allow 2222/tcp

UFW by default will deny all incoming connections and allow all outgoing connections. You can find more information on how to configure UFW here: https://help.ubuntu.com/community/UFW


It turned to be that the firewall was enabled.

After executing 'sudo ufw disable' I was able to remotely connect.

Thank you Brian and all for your help.

Regards,

Gonzalo.