Putty IP

I have a pc here with putty

In another city, I have a raspberry pi 3 in a room, with openhabian, with zstick and zwave devices.

How do I remotely control that raspberry pi with my pc putty?

What I would do is go on the raspberry pi, ping it to find its ip address. Then put that address in putty, and port 8080 or port 22?

But router changes IP address every 14 days or something like that? would that mean I have to change IP address manually again and again?

Any easy way to do this?

To get a shell you need to a ssh connection via putty to port 22.
You may look for a free DynDNS like service where router registers when it gets a new public internet adddress. You then can use DNS lookup via the name that you chose when you register your DynDNS service.
You also may need to open a port / port redirection on your router to enable access from the internet to your computer.
Doing that you should be able to login to your server via ssh.

But keep in mind once a port is opened to the internet it will be detected by all kind of script kidddies an others trying to get into it.

Instead of using a password on the target account you may use private / public key authentication only. Which should be more secure.
You can use something like fail2ban to ban IPs from the internet in case repeated login fails due to trials to find the right password.

1 Like

Your Question is absolutely unnrelated to openHAB and out of scope of this community.
You can ask google for “VPN access” to find a solution.

1 Like

It is definitely off-topic here.

You first need to clarify what is meant by `remote``. Using another PC on your home network has different requirements from accessing it over the public Internet.

Either way it is a general Linux and networking question totally unrelated to OpenHAB or this forum.

I suppose you could clarify “remote control”. Do you want to install software or edit files, or are you wanting to turn on a light controlled by openHAB?

1 Like

As you’re just after SSHing into your Pi located in another city, @Wolfgang_S has provided some good detail:

  • Open the relevant port on your router in another city, and forward it to your Pi.
  • You have a dynamic IP, so use a Dynamic DNS provider. If your router supports it you can update the Dynamic DNS provider directly from your router, otherwise you can easily do it through openHAB too.

Another thing I would read up on: hide openHAB behind a reverse proxy.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.