Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • BTW I use this and a systemd unit file and SSH tunnel my Jellyfin to a public VPS to its local host.

    I then use nginx to proxy it.

    Because its a unit file, sshd reconnects if my ISP's IP changes. Does so within 30s. Also hides my ISP IP in case I have to turn it off.

    And no data is effectively on the VPS. Its just a mostly empty machine.

  • Hak5 video that helped me understand many years ago about the practical usage of SSH forwarding

    Hak5 - SSH Forwarding: Local vs Remote with examples, Hak5 1113 part1 https://www.youtube.com/watch?v=g_Row8zEJZc

  • Learning how SSH port forwarding is great as a pseudo-vpn for everything from GUI-client database access to (in physical infra) access to web-admin tools for appliances.

    The socks proxy support can also deal with bad web filtering and privacy issues on public wifi networks (though nowadays if you're ssh'ing to a cloud IP, you'll get lots of "bot" restrictions).

  • Need to mention sshuttle [0] here, as it magically solves a bunch of these problems without constant reconfiguration

    [0] https://github.com/sshuttle/sshuttle

    by smw
  • The article mentions bastions, but no jumphosting?

      ssh -J user1@bastion1,user2@bastion2 targetuser@targethost
    
    Edit: Jumphosting was introduced in OpenSSH 7.3 2016-08-01.

    https://www.openssh.org/releasenotes.html

  • I never pass up an opportunity to recommend the Cyber Plumber's Handbook: https://github.com/opsdisk/the_cyber_plumbers_handbook

    Goes over similar content as TFA, in perhaps a little more depth. Indispensable sysadmin knowledge.

  • I'll mention it here, because I learned about it here.

    "~C" will drop you into the SSH command line, allowing you to, among other things, effect port forwarding

      -L8080:localhost:443
    
    Learning that "~C" exists, and what you can do with it, has supercharged my use of SSH tunnels, which were already awesome on their own.

    But for some reason this has been disabled by default in more recent ssh configurations... to ensure its available

      -o EnableEscapeCommandline=yes
    
    or, in your ~/.ssh/config

      EnableEscapeCommandline yes
    
    (edit: formatting)
  • My favorite use of this is peer-to-peer transfer of Docker images. The Docker CLI only allows you to use registries authenticated with HTTPS but there's an exception where it allows HTTP transfers over localhost.

    So, if you use SSH tunneling to forward a port from localhost to a remote, then Docker unwittingly pushes to a remote. This is super useful "off the grid" with robotics/embedded applications where you don't want to bother with a registry and a good Internet connection.

    Example, docker pussh: https://github.com/psviderski/unregistry

Explore Birbla archives