I have OpenSSH Server installed on a Ubuntu (Server) 14.04 machine. I can connect over my local network but cannot across the Internet. I have port forwarding set up on the router.
I have tried:
- Changing from port 22 to another (random) port to make sure it’s not because my ISP is blocking port 22
- Temporarily disabling the firewall for testing. Neither of these resolved the problem.
Any ideas why I can’t connect? The error is:
connect to address port : Connection refused
d
Here is the netstat
output:
netstat -apn | grep: 42530
(No info could be read for "-p": geteuid()=1000 but you should be root.)
tcp 0 0 0.0.0.0:42530 0.0.0.0:* LISTEN -
tcp 0 116 192.168.2.23:42530 192.168.2.11:58944 ESTABLISHED -
tcp6 0 0 :::42530 :::* LISTEN -
netstat -apn | grep :22
then see if it says0 0.0.0.0:22
it means it is bound in such a way as to allow any IP to connect. But if it says 127.0.0.1:22 or 192.168.0.1:22 then (in the case of 127.0.0.1:22) it is bound such that nobody other than localhost can connect or (in the case of 192.168.0.1:22) so that only other comps on the LAN can connect