Live data from Hacker News

SSH Tunneling Explained

goteleport.com

61–63 of 63 posts

Re: SSH Tunneling Explained

#61
post #24

If you're looking at going even deeper into SSH tunneling and port redirection, I recently made The Cyber Plumber's Handbook free: https://github.com/opsdisk/the_cyber_plumbers_handbook I made it free to the HN community a few years back [1]. There is a paid interactive lab portion (details in the repo) if you are looking for hands-on experience. Book Overview This book is packed with practical and real world example…

One thing I’ve always tried to find is a method of forwarding a local port on server A to a public facing port on server B. Googling this is very difficult. Is that possible with ssh?

I’ve also had this issue for quite sometime and I’ve used a few approaches over the years. My most recent approach has been to connect server A to server B, via WireGuard. Then on Server B I use nginx to reverse proxy the WireGuard IP address of Server A. This works nicely when: 1) you have access to install software server A, but it’s stuck behind a bunch of firewalls. 2) You’re trying to expose HTTP services- it’s possible to “stream” non-HTTP with nginx, but I don’t know enough to recommend that.

You might also want to look at Apache Guacamole or Boring Proxy. I’d love other recommendations!

Re: SSH Tunneling Explained

#62
post #44
post #23

Earlier quoted context omitted.

I have been looking into SSM recently and I was a little confused by the setup instructions but after seeing your comment I read them again and I think I understand more now. I was trying to see how SSM could be used to eliminate the need for engineers to have SSH keys set up with instances. > Who should use Session Manager? > ... > Users who want to connect to an instance with just one click from the browser or AWS…

Using CloudShell / the AWS Console for anything involved sounds painful though, among other reasons due to the 12-hour console session timeout. I suppose you might be able to use screen to mitigate it, but getting logged out right in the middle of doing something important seems unpleasant. The same thing makes AWS Sagemaker Studio unusable.

You can use the CLI and your terminal directly, as well as use SSH over SSM for proxying and SCP.

Re: SSH Tunneling Explained

#63

Earlier quoted context omitted.

One thing I’ve always tried to find is a method of forwarding a local port on server A to a public facing port on server B. Googling this is very difficult. Is that possible with ssh?

I’ve also had this issue for quite sometime and I’ve used a few approaches over the years. My most recent approach has been to connect server A to server B, via WireGuard. Then on Server B I use nginx to reverse proxy the WireGuard IP address of Server A. This works nicely when: 1) you have access to install software server A, but it’s stuck behind a bunch of firewalls. 2) You’re trying to expose HTTP services- it’s…

socat
Post reply on HN