I’m going to be away from home for a few weeks and would like to access my computer (LMDE) while I’m away. Remote desktop connection would be ideal, just file transfer would be acceptable.

Is a VPN necessary, or can port forwarding be good enough for a one time use?

What software/networking recommendations do you have?

  • @qwerty@discuss.tchncs.de
    link
    fedilink
    English
    3•2 hours ago

    If you can rent a vps you can use it as a relay server. You setup sshd on your home pc and ssh to the vps with the -R flag.

    ssh -R 8022:localhost:22 user@relay

    As long as the connection is live you can ssh to the server via relay. If you set GatewayPorts to yes on the relay in sshd_config then it will act as an open port on your home pc and anyone will be able to connect to it over the internet with

    ssh -p 8022 user@relay

    so make sure to secure it correctly, only allow ssh keys etc. If you set GatewayPorts to no, then only clients connected to the relay will be able to connect to the server, this is a must have if you’re gonna use unsecure protocols like VNC. First ssh to the server

    ssh user@relay

    next

    ssh user@localhost -p 8022

    or one line, especially useful when combined with -i to point at the home pc’s ssh key stored on the client

    ssh -J user@relay user@localhost -p 8022

    You can also setup VNC over ssh. Add 2nd -R on home pc with vnc ports

    ssh -R 5901:localhost:5901 user@relay

    or together

    ssh -R 8022:localhost:22 -R 5901:localhost:5901 user@relay

    On the client ssh with the -L flag

    ssh -L 5091:localhost:5091 user@relay

    Now you can connect your VNC client to

    localhost:1

  • Lettuce eat lettuce
    link
    fedilink
    English
    14•4 hours ago

    Tailscale or Netbird literally take 15 minutes tops to set up and get working. Then you just pick whatever services like SSH you want to use, have them accept connections only from Tailscale/Netbird IPs, and you’re gold.

    I use Tailscale on my entire home lab, and with my friends and family for everything from Minecraft, to accessing my Jellyfin home media server, to accessing my parent’s home PC across the country to check updates and backups.

    Fast, easy, free, and secure.

  • @FunnySalt@lemmy.dbzer0.com
    link
    fedilink
    English
    3•3 hours ago

    Answering on the idea of port forwarding. Though like others have said, tailscale or similar is a better option.

    Opening an ssh port would allow file transfer. You could also so remote desktop with port forwarding over ssh and vnc (or some other more modern protocol, haven’t futzed with anything like that in a long time).

    Probably doesn’t need saying but make sure your system is up to date. Also using a nonstandard port and using key based authentication and disallowing password authentication and good security measures. If the device you’re connecting from isn’t something you’re bringing with you, you’d also need a copy of your private key.

  • Strit
    link
    fedilink
    English
    1•
    edit-2
    2 hours ago

    If you want a full complete remote desktop solution, you should probably look at VNC and portforwarding its port. I think it’s 3001.

    Or if you won’t (or can’t) mess with port forwards, you could setup something like RustDesk for the TeamViewer experience.

  • @litchralee@sh.itjust.works
    link
    fedilink
    English
    17•
    edit-2
    6 hours ago

    Port forwarding is moderately simple but there are risks to just opening a port and not guarding it with appropriate firewall rules. This includes an SSH server if not up-to-date.

    Whereas setting up something like Tailscale on your machine and on your laptop is exceedingly straightforward, avoids firewall reconfigurations, and Just Works™. You could then connect to whatever service you have running, just as if you were on your LAN. My only gripe is that you do need a Google/Microsoft/GitHub/Apple account or OIDC to set up.

    In the long term, if you have misgivings about that company operating the coordination server necessary for this tunneling solution, then there’s always the open-source Headscale, which is a drop-in replacement.

    • @chrash0@lemmy.world
      link
      fedilink
      English
      10•4 hours ago

      will recommend. just use Tailscale. you may distrust any of these OIDC providers, but that doesn’t mean they can see your traffic. long term if you’re paranoid move to Wireguard or Headscale, but this is so simple it’s a no-brainer

  • @AbouBenAdhem@lemmy.world
    link
    fedilink
    English
    7•
    edit-2
    2 hours ago

    If you set up one port forward to any SSH server on your local network (e.g., a spare Raspberry Pi), you can then use SSH tunneling to mirror any port on any machine in your local network to ports on your remote SSH client. And it leaves no trace on either side outside of the terminal session.

  • @TheFogan@programming.dev
    link
    fedilink
    English
    6•6 hours ago

    I guess depends on the risk factor you want to take. For me I’d go VPN. You could go port forwarding, or you could even do something like temporarally use something like anydesk depending if you want to trust a corporation for remote access.