0

My desktop is a Linux (Ubuntu) machine with ssh server configured. It used to work fine before I moved the desktop to a new network. Now I can ssh into the machine from itself (either by ssh localhost or ssh ).

However, I cannot ssh from another machine. It gets stuck at "Connecting to **** port ****" and then times out. I have tried to look for firewalls, but there are none. I have allowed ssh and the port in my ufw. Also, if I check "service iptables status" I get "not-found".

My /etc/hosts.allow and /etc/hosts/deny are also fully commented out (i.e. no active filters). I can also ping to my desktop from my Macbook.

This seems to be a question discussed at multiple places online, but, even after spending several hours, I cannot find a solution. Can somebody please help me sort this out?

  • Firstly, iptables is not a service. It's a frontend for netfilter in the kernel, you can't 'shut it off' like a normal service. iptables -L -n -v will indicate rulesets. If you mean 'another machine' as in external to your local network and via the Internet, the router needs to NAT / port forward for that stuff. – Thomas Ward Oct 29 '18 at 15:23
  • I see. I get a long list using iptables command. What rule should I be looking for? My desktop is connected to the LAN, and my Macbook is connected to wifi, but the network is the same. – Ankush Oct 29 '18 at 15:44
  • I'd need to see your whole ruleset. Paste the ruleset (or the output of iptables-save) into your question as an edit. – Thomas Ward Oct 29 '18 at 16:13
  • I was wrong, and I think what you suggested is correct. Although I was connected to the same "network", there is probably some difference. After I use the VPN to connect to the network, I can ssh fine. Thanks for your help anyway! – Ankush Oct 30 '18 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.