0

Im running Arch Linux on a Raspberry Pi. I'm attempting to setup an ssh server but am running into an issue connecting to it externally.

I've installed OpenSSH on the Pi, which is behind a router.

I've been successful in connecting to the server using another computer on the same network. I used puTTY to connect using the LOCAL IP of the Pi, at port 22.

Because some places don't allow ssh, I've edited the sshd_config and sshd.socket to listen on port 443 instead of 22.

Now using puTTY I can connect to the Pi by putting the Pi's local IP in the host name box and 443 in the port box.

After visiting portfoward.com I configured my router's port forwarding as such:

Common Services: Other Name: SSH Service Type: TCP/UDP Server IP Address: (workstation local IP) Starting Port: 443 Ending Port: 443

I checked canyouseeme.org and it says Success: it can see my service at my external IP, port 443.

However, when I attempt to connect to the Pi using the EXTERNAL IP instead of the internal one, using port 443, the connection times out.

EDIT: To clarify, when I use the command: putty.exe -ssh LOCALIP 443 then I get a login screen and connect no problem, but when I type: putty.exe -ssh EXTERNALIP 443 then I get a connection timed out.

In some unrelated examples online i see people messing with the SSH / Tunnels section of the puTTY menu. But that doesn't seem to be related to what I'm doing... I want to be able to connect to my SSH server using port 443 from outside the network. What am I missing?

1 Answers1

0

user55325 has the answer in the comments above:

You need NAT loopback. Or run your own DNS server...

Essentially your SSH server is listening on the external IP, but you can't SSH to your external IP from inside your home network (behind your home router). You should try your test externally (from your phone perhaps) and verify SSH access works as expected.

Also, make sure you have a strong password or only use public key encryption, botnets tend to trawl the internet looking for SSH servers with weak passwords.

dwurf
  • 406
  • 2
  • 9