I'm setting up my first home server from an old pc. I've installed Ubuntu Server 15.10. I've been trying and doing some research but I couldn't make the SSH work from an external computer, it always returns "Connection refused"

It works fine if I try from a LAN computer. I've installed no-ip in order to get an easier address. Regarding port forwarding, I have changed the port and I did the port forwarding from the router's webpage ( I've checked in a website and it says my port is open.

The server is connected via ethernet from the router. I have 4 computers connected to my router. Since my external IP is the same from all computers, how does the ssh knows which computer to connect? How can I know to which computer am I connecting?

I've realized how to know to which computer I am connecting to, but I still can't connect

  • Hey, can you share the information how you port forwarded then? (The question regarding choosing the right computer to connect triggers caution that you might have wrong port forwarding) Normally you should choose an IP (your server) and port to forward as a specific port. – Paulius Šukys Jan 25 '16 at 20:10
  • When you configure your router for forward the port , the router then knows which of the 4 computers to send to. It sounds as if you have to configure your router and not ubuntu. Could be a problem with no-ip . – Panther Jan 25 '16 at 20:18
  • @PauliusŠukys This is what I did on my router's webpage: Customer 3737 3737 TCP 3737 3737 ppp0 and Customer 3737 3737 TCP 3737 3737 ppp1 Being it Server name - Inicial External Port - External Final Port - Protocol - Internal Inicial Port - External Inicial Port - Server's IP - WAN Interface – Ckubrak Jan 25 '16 at 20:44
  • @bodhi.zazen I've also checked without using no-ip, I mean with my external IP and it's still not working – Ckubrak Jan 25 '16 at 20:49
  • Hard to tell from what little you have posted. As it works on your LAN, my best guess is that you need to configure your router. – Panther Jan 25 '16 at 20:57

Does your router support DMZ network. I recently set up my webserver on my home router. And instead of port forwarding, I used my servers static ip in the DMZ zone. This way my server is connected to my public ip. And i can ssh from outside using the public IP too. Just make sure that using DMZ exposes the server to outside world so dont forget to install a firewall (i use shorewall) and just open ports you want. For ssh open 22. Thats it. Regarding port forwarding i guess you'll get good suggestions from other community members. If you have any questions regarding ssh to server iin DMZ of your router. Shoot here..

  • Thanks for your answer, it seems my router does support DMZ. However, I'll try with port forwarding since it seems safer. If I continue failing, I will do some research on DMZ to see what I am facing and I will give it a shot – Ckubrak Jan 25 '16 at 21:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.