I'm trying to connect to my server (Ubuntu Server 16.04) from a remote host via ssh. I've followed all the procedures to install ssh server properly on both machines. I disabled all UFW and 'ACCEPT' everything (input, output, forward) in the iptables.
I forwarded port 22 to the server on my router (technicolor tg789 v2), and disabled the firewall. I set the server IP to static and am using a Dynamic DNS (noip). I set ssh key on the machine I want to connect from and I can connect to the server locally using that (without using a password).
The ssh config file is configured as specified in other tutorials and answers so that ssh listen to all adresses.
The problem seems to be that port 22 (or any other port i tried) is not reachable from the internet, since when I check on canyouseeme.org it tells me connection timed out (same thing it tells me when i try to connect from another network). Everything is configured just fine (or at least as it seems it should be reading other tutorials and threads).
I've read lots of tutorials and questions on the web, but I can't figure out how to fix this. It's very annoying, can anyone help?
I've tried to connect to a MySQL server on the server using port 3306, but still no luck, I can only connect locally. (I forwarded the port first) I disabled the router's firewall too. Here are some output from the server configuration:
netstat -tln Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp6 0 0 :::3306 :::* LISTEN tcp6 0 0 :::22 :::* LISTEN
iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
ufw status Status: inactive