Live data from Hacker News

Show HN: Mole – an open source tool to easily create ssh tunnels

davrodpin.github.io

41–50 of 61 posts

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#42

What do you guys think of that cross-distro, Linux installation method? curl -L https://.. . | tar xz -C /usr/local/bin

This command actually fails if /usr/local/bin doesn't exist. He could simplify it by releasing the binary alone and running `curl -L --create-dirs -o /usr/local/bin/mole https://...`, but my guess is uncompressed it's huge. (edit: possible that the GitHub server would support `curl --compressed ...`, allowing the HTTP connection to compress it in transit)

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#43
post #22
post #17

Earlier quoted context omitted.

Mosh support roaming and intermittent connectivity which is really super useful if you have to debug a server on a very dodgy 3g connection in a moving train.

I just learned about mosh, ty. I use SSH sessions all the time and sometimes over satellite links.

You should run tmux or screen inside it anyway. There's no way to reattach to a broken mosh session, as happens if you close the local terminal.

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#44
post #4

Very nice. I'd consider pinging the guys of OpenBSD to suggest upstreaming this interesting, user friendly, syntax into SSH itself.

You can do the same thing with the ~/.ssh/config file. Add a configuration block for the host you want to connect to with the ports you want to map. I agree that an official user interface to editing the config with the most common examples would be really handy.

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#45

I'm not sure if I missed something? Normally I use -L syntax for tunneling (-L local_port:remote_addr:remote_port). Does this tool do more?

there's multiple ways to make tunnels in ssh. -L is one of them (local forwarding). basically, local, remote and dynamic forwarding are possible. there's some interesting uses for the latter 2 as well so if you only know -L it might be nice to check out the other methods and how you can use those. You can for example, forward a remote localhost port of a server to your own localhost, and then have a fully encrypted channel to some internal or locally bound service. for example if some server hosts a site on it's loopback or some service is listening there which you want to interact with, then you can do it directly from your own machine instead of through an active ssh session. (for example with websites this is useful, because then you can have a graphical browser instead of links via ssh x11 forwarding or w/e)

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#48
post #10

Earlier quoted context omitted.

I don't think i've missed anything, it does the same thing as ssh -L with slightly different syntax. It's the same with mosh. Normally i use tmux on the destination host, and i simply cannot see any reason to use mosh over ssh/tmux.

> i simply cannot see any reason to use mosh over ssh/tmux. How about automatic session resumption and predictive character insertion to improve typing when under latency?

Since mosh relies on UDP, it's completely useless for folks who are behind proxies (e.g. for work, school, etc)

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#49
post #40

Earlier quoted context omitted.

I use tar daily, so yes, i remember the syntax :) copy files from a to b: (cd /src && tar cf - .) | (cd /dest && tar xf -) operations are easy :(c)reate, e(x)tract, (t)est options the same: (f)ile, (v)erbose, g(z)ip compression. the only illogical ones is bzip2 compression and xz compression with -j and -J I think i can remember cpio syntax as well, though i haven't used that i a decade, but did use it quite often in…

Well, it turns out we have different expectations regarding those tools. My brain chooses to store other things in life.

This seems to imply that he is not 'storing other things in life' because he's able to remember that L=local forwarding R=remote forwarding and D=socks proxy

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#50
post #25

Earlier quoted context omitted.

If it's easy for you to remember ssh syntax, then for you ssh is the better tool. As far as I'm concerned, I never remember the different syntax between -L, -R, -D, etc. Always have to read a doc somewhere. In the same topic, do you remember the syntax of tar? I don't. https://www.xkcd.com/1168/

I use tar daily, so yes, i remember the syntax :) copy files from a to b: (cd /src && tar cf - .) | (cd /dest && tar xf -) operations are easy :(c)reate, e(x)tract, (t)est options the same: (f)ile, (v)erbose, g(z)ip compression. the only illogical ones is bzip2 compression and xz compression with -j and -J I think i can remember cpio syntax as well, though i haven't used that i a decade, but did use it quite often in…

It was fun when I mixed up source and destination in my tar command and overwrote 4 hours of work ;)
Post reply on HN