SSH over different wifi

November 10, 2023, 10:56

k9t33n

if I'm on a different network is there a way to still ssh into my pi?

oops.se

VPN or port forwarding, but you need to explain yur ssituation a bit more

k9t33n

well I want to control my robot when I'm on data or a freinds WiFi

wolfgrimm

Wireguard.

k9t33n

could you explain more about that?

_krazy.

Instead of you using your local ip (192.xxx.xxx.xxx) to access it, you use some ip somewhere like pi@52.124.110.13:22 and when you do it and enter your passwd you'll enter it

_krazy.

Anyone around the world connected to the internet can too

_krazy.

So you need to secure it

_krazy.

And if you didn't mean to access it from around the world try using your data

_krazy.

Like hotspot of your mobile and setup the pi so it connects automatically to it

k9t33n

the pi will be at home

k9t33n

so I use my public IP?

k9t33n

how can I get my public IP, also I know to make sure to be secure with this one

null

You can see this in the router or if you are in your network, you can find out your public IP at https://mxtoolbox.com/whatismyip/. But remember that this can change every 24 hours or less, depending on your internet provider, if you don't have a fixed public IP.

wolfgrimm

I can't really speak much as to how to setup wireguard on a device. I have it on my unifi controller and that gives me access to my local network. I would assume you install and configure the wireguard server on the pi, port forward for it in your router, then add a user for yourself on the pi, and copy/transfer the config file to your client device.

wolfgrimm

once you connect a wireguard server you should have full access to your home network.

k9t33n

ok thank you guys ill close this thread now