Live data from Hacker News

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

davrodpin.github.io

11–20 of 61 posts

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

#11
post #4

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

is the ssh syntax for doing the same thing really that bad ?

I find it easy to remember, it's just one flag (-L) with local_port:remote_ip:remote_port

to forward local port 3306 to mysqlhost:3306:

    ssh -L 3306:mysqlhost:3306
The strength of using ssh is that you can forward multiple ports with the same connection. i.e.

    ssh -L 3306:mysqlhost:3306 -L 8080:webhost:80

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

#12
post #8
post #7

Here are the example commands, with the SSH equivalent. There's a small syntax difference, but otherwise I don't think this tool adds much. $ mole -local 127.0.0.1:3306 -remote 127.0.0.1:3306 -server example@172.12.0.100 $ ssh -L3306:127.0.0.1:3306 example@172.12.0.100 $ mole -v -local 127.0.0.1:8080 -remote 172.17.0.100:80 -server user@example.com:22 -key ~/.ssh/id_rsa $ ssh -v -L8080:172.17.0.100:80 -p 22 -I ~/.ssh…

mole also doesn't seem to support DynamicForward for creating SOCKS proxies. Mind you, I'm not sure how it could improve on native ssh for concision: ssh -D *:1080 work Combined with a .pac file that proxies my work domain(s) through the tunnel, it's all the forwarding I ever need. ETA: largely redundant comment now the parent now also mentions this option. :)

I think it's worth drawing attention to it. It's a very useful feature; just don't tell the network administrators.

NB including

  *:
does mean anyone on your local network (assuming a firewall at the gateway) can use your computer to proxy to work. That's great if you're on a private LAN and want to look at a work site on your phone, but not great at a coffee shop.

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

#13
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?

session resumption:

    tmux a
As for predictive character insertion, when i'm working in a shell, especially with high latency, i prefer my commands to be as i type them, not something some algorithm "guessed" i was going to type.

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

#14
post #10

Earlier quoted context omitted.

> 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?

session resumption: tmux a As for predictive character insertion, when i'm working in a shell, especially with high latency, i prefer my commands to be as i type them, not something some algorithm "guessed" i was going to type.

It doesn't guess. It sinoly has local echo, and the characters that are not-yet-ack'd are underlined. Changes your life when working with 175ms+ latency

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

#15
post #10

Earlier quoted context omitted.

> 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?

session resumption: tmux a As for predictive character insertion, when i'm working in a shell, especially with high latency, i prefer my commands to be as i type them, not something some algorithm "guessed" i was going to type.

That's not what mosh is, it doesn't predict what you're going to type. It however proactively renders the characters you type before it receives confirmation from the tty on the other end.

In other words, imagine typing ssh somebox.typo.com and waiting 1 second before the text renders and discovering the typo, then pressing backspace, waiting a while for the backspaces to render, then going through all of this again. With mosh you'll be able to instantly see what you typed and fix it. On high latency connections it makes a huge difference in quality of life.

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

#17
post #10

Earlier quoted context omitted.

> 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?

session resumption: tmux a As for predictive character insertion, when i'm working in a shell, especially with high latency, i prefer my commands to be as i type them, not something some algorithm "guessed" i was going to type.

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.

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

#18
post #10

Earlier quoted context omitted.

> 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?

session resumption: tmux a As for predictive character insertion, when i'm working in a shell, especially with high latency, i prefer my commands to be as i type them, not something some algorithm "guessed" i was going to type.

tmux solves the session resumption at a lower level. You can have a connection from home, jump on a train, open your laptop and keep typing and do the same when you get into the office. You don't need to re-auth each time (or deal with delayed disconnects).

It works well WITH tmux, not instead of tmux.

Which means your solution would be something like:

  while true; do
    ssh -t ${HOST} tmux a
  done
But that lacks the other benefits, especially having to wait for the session to timeout.. Take a look at: https://en.wikipedia.org/wiki/Mosh_(software)#Performance
Post reply on HN