Remote SSH my RPI (non local)

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
DewGew
Posts: 10
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi
Domoticz version: V3.5877
Location: Sweden
Contact:

Remote SSH my RPI (non local)

Postby DewGew » Friday 17 February 2017 11:13

I want to be able to access my Pi anywhere (outside a local network) via ssh. Its not working with any android app like JuiceSSH localy on my phone either.
It works fine on local network with my desktop (putty or winspc).
When I connect via ssh over internet I can login with username and password but then nothing happens I get connection timeout.

I have:
[*]i use rpi wifi dongle not ethernet cable
[*] public ipadress is static from my ISP
[*] set my RPI with static ipadress. (also reserved same ipadress in my router)
[*] open port 22 in my router ( Netgear wnr1000v3)

Any Ideas that might help?

shaneben
Posts: 4
Joined: Thursday 16 February 2017 22:39
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Remote SSH my RPI (non local)

Postby shaneben » Friday 17 February 2017 22:13

Have you looked at Port Forwarding? The static IP on your local network will be different than the outward facing IP. You will need to tell the router where to point port 22 at on the internal network.

So if RPI is at 192.168.1.30 you would set the port forwarding on the router to have port 22 forward to 192.168.1.30.

SweetPants
Posts: 1143
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.6765
Location: The Netherlands
Contact:

Re: Remote SSH my RPI (non local)

Postby SweetPants » Friday 17 February 2017 22:42

shaneben wrote:So if RPI is at 192.168.1.30 you would set the port forwarding on the router to have port 22 forward to 192.168.1.30.

Don't use standard port numbers like 22 for SSH but use port translation like 2222 -> 22. Standard ports are likeley to be used first when somebody tries to hack into your network. If you are using Linux, also install fail2ban for SSH (google for it)

shaneben
Posts: 4
Joined: Thursday 16 February 2017 22:39
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Remote SSH my RPI (non local)

Postby shaneben » Friday 17 February 2017 23:35

SweetPants wrote:Don't use standard port numbers like 22 for SSH but use port translation like 2222 -> 22. Standard ports are likeley to be used first when somebody tries to hack into your network. If you are using Linux, also install fail2ban for SSH (google for it)


Great advice also look into disabling the user/pass login and use SSH Keys instead.


Return to “Other questions and discussions”

Who is online

Users browsing this forum: No registered users and 3 guests