• 0 Posts
  • 53 Comments
Joined 1 year ago
cake
Cake day: August 6th, 2023

help-circle

  • If your local machine is not reachable from the internet, you could set up the cheapest VPS - you can get a free one for 12 months at https://azure.microsoft.com/en-us/free/#all-free-services Connect from your destination machine (the firewalled one) to the VPS, and set up a reverse tunnel. For example, drop this into your ~/.ssh/config on the destination machine:

    Host rtun
            Hostname something
            RemoteForward 1234 localhost:22
    

    tmux new-ses 'while sleep 1; do ssh rtun; done'

    Then configure your local machine to connect to destination via the jumpbox:

    Host vps
            Hostname something
    
    Host destination
            Hostname localhost
            Port 1234
            ProxyJump vps
    

    ssh destination should work now.

    Make sure to use SSH key auth, not passwords, and never transport secret keys off-machine. It’s easier to wipe and recreate a VPS, if you lose keys, than to explain to Security folks how you were the donkey that enabled the breach.





    1. Log into the Windows machine via the webclient avaliable at https://windows365.microsoft.com/
    2. Use PuTTY to set up a reverse tunnel. You’ll need to create a restricted tunnel-only user in your machine. Make sure to use key auth.
    3. From your local machine, connect to localhost:portnumber.

    As an alternative, you might be able to set up OpenSSH in Windows (yes it’s possible), then use the ProxyJump setting in your local ~/.ssh/config to connect via a tunnel to the final box.

    Here’s how you configure the server to not let the user wreak too much havoc:

    Match User restricted
            PermitOpen 127.0.0.1:3389 [::1]:3389
            X11Forwarding no
            AllowAgentForwarding no
            ForceCommand /bin/sh -c 'while sleep 999; do true; done'
            ClientAliveInterval 1
            ClientAliveCountMax 2
    









  • i3, or Sway if you’re on Wayland, just gets out of your way.

    Have a virtual desktop for each use case, memorize where your apps are, and enjoy muscle-memory-based window management. Mod4+1 brings me to terminal, 2 is browser, 3 is work stuff, 4 is personal chat, 5 is email… Every app is fullscreen, for maximum screen real estate. Nothing annoys by blinking when I’m trying to concentrate on something else.


  • cizra@lemm.ee
    cake
    toSelfhosted@lemmy.worldDynamic IP - Self hosting
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 days ago

    How often does your IP actually change? Mine changes so rarely (during extended power outages, say) that I am able to just update my IP manually when it does.

    I even used to run my own authoritative DNS server at home (the one offered by my registrar isn’t configurable enough, think SRV and TXT records) - for that, I have a web UI at my registrar to set the IP addresses of the DNS server.


  • BtrFS has Stuff.

    • Subvolumes, which enable you to share the same /home between Linux distros
    • Snapshots that are an great for
      • freezing the FS during off-machine backups: create a snapshot, rsync the snapshot not the main FS, drop the snapshot
      • transient backups. Will executing this thing hose my system? If no, drop the snapshot.
    • ability to pool different disks into a single FS
    • and so much more.

    Fun story: once I needed to do something (resize? can’t recall) a partition that happened to be in use. The solution involved smbmounting a network disk, losetup helping transform that thing into a virtual disk, then migrating the root FS there, recreating partitions, all while running the rootfs on that thing. Thus, pooling can bu useful.

    By the way, what does Zsh have over bash that you find useful?