Live data from Hacker News

A visual guide to SSH tunnels

robotmoon.com

71–80 of 82 posts

Re: A visual guide to SSH tunnels

#71

One common use is to secure vnc, which has no crypto built into it. On the remote host, have the vnc server listen only on localhost:5901 This assumes everyone who can ssh to the server should be allowed access. On your workstation, form an ssh tunnel to that remote host and its port, and link it your own localhost:5901 Open your vnc client GUI and set it to open 127.0.0.1:5901, voila, vnc session. More fun things: s…

I do this for a number of hosts simultaneously with macos and map them specifically in my .ssh/config:

  Host mac-a
    ...
    LocalForward 5903 localhost:5900

  Host mac-b
    ...
    LocalForward 5904 localhost:5900
then I open the directory /System/Library/CoreServices in the Finder and drag Screen Sharing.app to the dock.

to remote into machine mac-b, in a terminal window:

  ssh mac-b
The first time, click on "screen sharing" in the dock, and in the connect dialog enter localhost:5904

After that, you can right-click on screen-sharing in the dock - even when it's not running - and you will see a context menu item for "mac-b 5904.vncloc"

By the way, mac to mac screen sharing is very well done (will they axe it next?)

- it is very fast

- the keyboard stuff just works

- you can copy/paste even rich text between the local and remote macs

- you can drag and drop files from the remote desktop to the local one

Re: A visual guide to SSH tunnels

#72
post #63

For those interested in the topic of tunneling, I highly recommend The Cyber Plumber’s Handbook [1] to gain an even deeper understanding and examples beyond SSH. [1] https://cph.opsdisk.com/

Appreciate the shout out magicconch! Just added a HN family discount to pick up the book, lab guide, and lab access for $10. https://gum.co/cph_book_and_lab/hackernews20210207

Just tried to grab a copy but gumroad returns a 404 after trying to pay with Paypal. Do you sell it through another shop, too?

Edit: Never mind, it seems it was a problem with Firefox. Chromium worked.

Re: A visual guide to SSH tunnels

#73
post #22
post #20

Earlier quoted context omitted.

One can further tunnel SSH inside of TLS with Stunnel [0] to get through firewalls that block SSH but permit arbitrary TLS connections. Loading a website through this requires three layers of TCP but assuming the connection is good this should be okay. A couple reasons for a regular VPN: they can be made automatic and persistent so the tunnel is always ready for use, they can tunnel other protocols besides TCP, they…

Stunnel and ssh tunnels don't put TCP inside TCP so it shouldn't risk any TCP-in-TCP congestion issues?

SSH is a TCP connecting though, isn't it? How do you avoid TCP inside TCP when both are TCP? Oram I missing something?

Re: A visual guide to SSH tunnels

#74
Every once in a while I wonder how the SOCKS5 stuff works at the protocol level, I would like to be able to SSH out without running a proxy process locally, just talk to the ssh deamon on the relay server directly. The OpenSSH code is a bit dense but it looks like it creates dynamic tunnels that are torn down when the connection closes. Anyone confirm that is what happens behind the scenes?

Re: A visual guide to SSH tunnels

#75

In a computer networks (the Internet), if I can see you, you can see me.

You might want to be a bit more specific than computer networks. Monitor/ promiscuous mode is a thing, and so is dropping packets. It's not much use outside of wifi anymore, but there's still a few dumb hubs around.

Re: A visual guide to SSH tunnels

#77
post #72
post #63

Earlier quoted context omitted.

Appreciate the shout out magicconch! Just added a HN family discount to pick up the book, lab guide, and lab access for $10. https://gum.co/cph_book_and_lab/hackernews20210207

Just tried to grab a copy but gumroad returns a 404 after trying to pay with Paypal. Do you sell it through another shop, too? Edit: Never mind, it seems it was a problem with Firefox. Chromium worked.

Let me know if it's still giving you trouble...contact info is in my profile.

Re: A visual guide to SSH tunnels

#78
post #63

Earlier quoted context omitted.

Appreciate the shout out magicconch! Just added a HN family discount to pick up the book, lab guide, and lab access for $10. https://gum.co/cph_book_and_lab/hackernews20210207

very cool, just grabbed a copy.

Appreciate the support pixelface...hope it helps!

Re: A visual guide to SSH tunnels

#80
post #63

For those interested in the topic of tunneling, I highly recommend The Cyber Plumber’s Handbook [1] to gain an even deeper understanding and examples beyond SSH. [1] https://cph.opsdisk.com/

Appreciate the shout out magicconch! Just added a HN family discount to pick up the book, lab guide, and lab access for $10. https://gum.co/cph_book_and_lab/hackernews20210207

Thanks for the HN discount! Purchased.
Post reply on HN