this post was submitted on 22 Jun 2023
19 points (95.2% liked)

Linux

48240 readers
653 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
 

SSH is yet another example of an ancient technology that is still in wide use today. It may very well be that learning a couple of SSH tricks is more profitable in the long run than mastering a dozen Cloud Native tools destined to become deprecated next quarter.

One of my favorite parts of this technology is SSH Tunnels. With nothing but standard tools and often using just a single command, you can achieve the following:

  • Access internal VPC endpoints through a public-facing EC2 instance.
  • Open a port from the localhost of a development VM in the host's browser.
  • Expose any local server from a home/private network to the outside world.

And more 😍

top 5 comments
sorted by: hot top controversial new old
[–] SpaceCadet2000@kbin.social 2 points 1 year ago

ssh tunneling can be very useful for testing or one-shot things where you quickly need access to a service that's not directly reachable, but I wouldn't use it as a permanent solution for anything. You quickly run into problems like:

  • TLS certificates don't work, so you get into the habit of clicking through security warnings or turning of TLS validation altogether.
  • Virtual hosts don't work
  • Port conflicts when you want to access the same type of service on different remote machines, so you have to remap them and remember things like: localhost:8080 is foo:80 and localhost:8081 is bar:80
  • If it's not your infrastructure (i.e. you are an employee in a larger company), you are probably bypassing all kinds of security rules by exposing a service and your security guys will not be too happy about it if they find out.
[–] buedi@kbin.social 2 points 1 year ago

SSH Reverse Tunneling is super useful to get remote systems connected which only have very limited internet access through mobile carriers. They usually do NAT and you have no chance to connect to these sites with a dial-in VPN or other technologies that require YOU to connect to the remote system. So we just create a reverse ssh tunnel with autossh that is kept alive by the remote system itself and we connect back to the system to the ssh tunnel. Since ssh is installed anyway, that is one of the simplest and most versatile options to connect to these systems for us.

[–] skami@sh.itjust.works 2 points 1 year ago

Great resource, thanks for sharing

[–] RandomChain@lemm.ee 1 points 1 year ago

Thanks, bookmarking that. I always get -L and -R mixed up and have to look up examples, this one looks very handy.

[–] kool_newt@beehaw.org 1 points 1 year ago* (last edited 1 year ago)

The clean new syntax for jumping is great too.

ssh -J jump.example.com target.example.com

Check out https://wiki.gentoo.org/wiki/SSH_jump_host