this post was submitted on 06 Jul 2024
28 points (100.0% liked)

Linux

48190 readers
1405 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

My issue is that many of my remote desktop apps require knowing the IP adress of the other PC. I'm looking for a VPN that auto-discovers other devices on the same network. That way I could just "ssh" into the same IP every time, because it would be IP inside of a virtual network. Ideally I am looking a solution that does not require internet connection.

Thanks.

Edit: I should probably specify my usecase. I have a portable desktop and use VNC from a laptop to connect to it. To do that I need the IP of the desktop but that's different on a different network. This can be solved by using hostname.local as the "IP". (hostname is the "ubuntu" in "bob@ubuntu$:~/Documents") The solution is quite simple, I just haven't known about it.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 4 months ago (1 children)

mDNS solves this. It may actually work out of the box. Try ssh'ing into your-device-name.local. If that fails, check your devices' names and if they have Avahi/Bonjour/mDNS enabled.

Something like Tailscale will set up a VPN with hostnames and IP addresses for you (and you can host your own entry server if you don't want to use the cloud stuff). That'll work across networks. It'll also add overhead and it's probably overkill for your use case, though.

[–] [email protected] 4 points 4 months ago (1 children)

Thanks, it does indeed work. I guess I'll add a wireguard tunnel so that I won't have to bother with the "do you trust the fingerprint?" every time I'm on a different network or when the IP changes.

[–] [email protected] 6 points 4 months ago (1 children)

If you use the .local syntax, and the device name stays the same, I think the domain name based fingerprint should prevent the "do you trust this fingerprint" problem.

If you want to avoid the question all together, you could set up an SSH certificate authority (quick guide here, less dense guides are available on the internet). By signing the servers' host keys, you can prevent the trust on first use prompt entirely, even for servers you may not have logged into before.

[–] [email protected] 2 points 4 months ago (1 children)

Actually I want to use the wireguard tunnel regardless because right now I am tunneling VNC through SSH, which is laggy because it's TCP. But thanks either way.

[–] [email protected] 2 points 4 months ago

Ah, in that case I would definitely recommend taking a look at Tailscale!