Can't SSH remotely

I’m trying to ssh remotely into my Raspberry, but I’m not able to do this.

Through my router settings I port forwarded port 22(internal) to 443 (external) on the local IP of the Raspberry (, then when I’m not connected at my home wifi and I try to connect using putty, I get connection timed out.

To ssh remotely, I tried with my remote IP (5.xx.1x4.x) and also with my ddns.

Also, I port forwarded other Raspberry ports since I’m running on it TvHeadEnd and other services, and from remote I can connect successfully to this ports.

So the problem is SSH and/or port 22.

Thanks in advance for the help

You first need to see if you can SSH to the Pi from your local network. And, yes, it should be on port 22 by default.

Yes, of course I’m able to SSH from my local network. And yes, it is on port 22.

I’m using my Raspberry and OSMC since months without problems, but just now I need to access it remotely.

I don’t use PuTTY, but I’d hope there is some kind of debugging in it. (In Linux SSH, you have -v, -vv and -vvv).

So if I read this correctly, you’ve not actually tried to SSH from outside yet but are bouncing off the external IP address. Correct?

I tried to SSH from outside, using both the external IP address or my DDNS.

Also, I tried to SSH from my smartphone using an app and I got “ Connection reset”

I’d suggest that you enable debug logging in /etc/ssh/sshd_config. Set LogLevel DEBUG, then run:

sudo systemctl restart ssh

If you’re getting any kind of connection, you’ll see debug information at the end of the system journal (sudo journalctl) if you try to SSH to the box.

I really don’t know how, I installed Raspbian on a new SD, put it into the Raspberry and here remote SSH worked. Then I put again the SD with OSMC and now remote SSH is working here too O.o

Well, thanks anyway for your help :slight_smile:

Good to hear. Perhaps my first response should always be: “Have you turned it off and back on again?” :wink:

1 Like

Of course I did :grin:. Also, as I said, I’m using the Raspberry since months and so I reboot it hundread of times.

If you can, mark this topic as solved :wink:

Click on … and you can mark as solved.

Not really recommended from a security point of view

1 Like