News for hackers. Stuff that matters.
Re:Mosh: the mobile shell by insaneirish on Monday September 05, 2016 @08:06AM (#12429690)
As a side note, Keith Winstein (https://cs.stanford.edu/~keithw/), the creator of mosh, is an interesting guy (e.g. he used to be a WSJ reporter among other things).

I had the pleasure of seeing him speak at a conference last year on the topic of TCP congestion control algorithms. I admit, I expected it to be a boring presentation, but was then thrilled as it was one of the most dynamic, informative, and funny technical talks I've ever seen.

That particular presentation isn't online, but he links to several others on similar topics. I would check them out. They're probably pretty good!

Re:Mosh: the mobile shell by berbc on Monday September 05, 2016 @08:12AM (#12429721)
His presentation "Transport Architectures for an Evolving Internet" could be the one you're referring to? It's online and very interesting: https://www.youtube.com/watch?v=UsCOVF0vDe8.
Re:Mosh: the mobile shell by shocks on Monday September 05, 2016 @07:10AM (#12429473)
A great bit of kit, but totally unusable for me because of a lack of agent fowarding support[1]. :(

1: https://github.com/mobile-shell/mosh/issues/120

Re:Mosh: the mobile shell by d33 on Monday September 05, 2016 @07:17AM (#12429494)
Why would you need agent forwarding? It's a really dangerous feature.
Re:Mosh: the mobile shell by jstanley on Monday September 05, 2016 @07:19AM (#12429499)
It's useful in a corporate environment where you have tens to hundreds of machines you need to use, and all of them are trusted.

EDIT: "a really dangerous feature" is accurate though. For example if all of the staff have root access on a staging machine, then anybody can steal the ssh-agent of another user on the staging machine, and use it to login as that user on production machines.

Re:Mosh: the mobile shell by Daviey on Monday September 05, 2016 @07:29AM (#12429541)
A better way of solving it is to resolve the issue i raised: https://github.com/mobile-shell/mosh/issues/285
Re:Mosh: the mobile shell by ajdlinux on Monday September 05, 2016 @07:27AM (#12429534)
It'd be kinda nice if you could wrap it with some minimal level of protection through SELinux or something. Still wouldn't be as secure as switching it off, but at least a malicious insider would have to jump through a couple of hoops to get there.
Re:Mosh: the mobile shell by falcolas on Monday September 05, 2016 @10:47AM (#12430585)
In my opinion, it's much safer to do one of two things - use `-oProxyCommand=ssh <gateway> nc %h %p`, or set up different keys on the gateway host.

You risk the security of your SSH key when you use -A.

Re:Mosh: the mobile shell by Daviey on Monday September 05, 2016 @11:42AM (#12430844)
Yeah, that is what my response above points to.
Re:Mosh: the mobile shell by 4ad on Monday September 05, 2016 @08:33AM (#12429825)
In such an environment you should be using Kerberos. Then you won't need agent forwarding, and you can maintain security.

I would argue that in such an environment you really should be using LDAP+Kerberos, but if you think LDAP is too much effort (it really isn't), plain Kerberos is comparatively trivial to administer, and adding Kerberos (unlike LDAP) doesn't really require any significant changes to your environment.

Re:Mosh: the mobile shell by brians on Monday September 05, 2016 @10:05AM (#12430377)
Why is Kerberos ticket forwarding better than agent forwarding? Either way, root (or a bad .bashrc) can use your credentials while you're logged in.
Re:Mosh: the mobile shell by 4ad on Monday September 05, 2016 @11:59AM (#12430921)
Sorry. You are absolutely right. Long day...

I disable Kerberos ticket forwarding here, for this exact same reason. But then you don't have ticket forwarding! I don't know what I was thinking.

Re:Mosh: the mobile shell by jstanley on Monday September 05, 2016 @10:13AM (#12430414)
How does LDAP solve the problem?

We use LDAP to manage public keys for each user, but they still need to supply a private key at some point.

Re:Mosh: the mobile shell by 4ad on Monday September 05, 2016 @12:01PM (#12430929)
I was talking about Kerberos, not LDAP. However, that's still not right, see parallel comment.
Re:Mosh: the mobile shell by ajdlinux on Monday September 05, 2016 @07:22AM (#12429515)
Extraordinarily useful on an internal corporate network, especially when you're scp'ing remote->remote and so on.
Re:Mosh: the mobile shell by 4ad on Monday September 05, 2016 @09:08AM (#12430022)
Just use kerberos. You don't need LDAP to use Kerberos (although you probably should be using LDAP too). Kerberos without LDAP is trivial to set-up and administer, and it's very non-invasive, so you don't need to do any significant changes to your organization.
Re:Mosh: the mobile shell by vacri on Monday September 05, 2016 @09:34AM (#12430173)
ssh'ing through the jumphost when the VPN on it wasn't working properly was a use-case for me. Agent forwarding is fine, as long as you use it judiciously.
Re:Mosh: the mobile shell by Mic92 on Tuesday September 06, 2016 @01:18AM (#12433800)
I use this patch for some time and it works great for me.
Re:Mosh: the mobile shell by okket on Monday September 05, 2016 @07:41AM (#12429594)
Testing mosh made me aware how much I am relying on the port forwarding feature in ssh in my daily work, and how hard it is to replace it.

Otherwise: Great tool.

Re:Mosh: the mobile shell by qwertyuiop924 on Monday September 05, 2016 @08:39AM (#12429855)
Mosh is possibly the most useful piece of software that I've seen: it makes remote links over slow, unreliable networks bearable for doing Real Work. Speaking as somebody who usually has two rubbish networks between the computer I'm on, and the conputer I'm connecting to, that's incredibly useful.
Re:Mosh: the mobile shell by musicmatze on Monday September 05, 2016 @10:05AM (#12430380)
Absolutely. I'm using it for two or years or something by now and the very first thing I do when having a new host: install the mosh server.
Re:Mosh: the mobile shell by donatj on Monday September 05, 2016 @07:32AM (#12429550)
As I recall it needs a swath of nearly a thousand ports open. Getting one opened in a corporate environment is difficult enough.
Re:Mosh: the mobile shell by d33 on Monday September 05, 2016 @08:02AM (#12429678)
That's a weird setup! Why wouldn't they use a single port?
Re:Mosh: the mobile shell by homero on Monday September 05, 2016 @08:53AM (#12429930)
Bunch of udp
Re:Mosh: the mobile shell by sschueller on Monday September 05, 2016 @07:34AM (#12429559)
depends on number of connections, 60000-60020 works fine.
Re:Mosh: the mobile shell by visarga on Monday September 05, 2016 @06:33AM (#12429330)
Oh, it's just a repost. I thought they released version 1.3 with scrollback support.
Re:Mosh: the mobile shell by ajdlinux on Monday September 05, 2016 @07:20AM (#12429505)
The lack of scrollback support has made mosh pretty useless to me. I like many of its other features, but in order for it to replace ssh for me it needs to look like it's just printing text to stdout. (Yes, this is why I also tend to avoid using screen and tmux for anything other than holding open a remote shell session.)

Will have to check out 1.3...

Re:Mosh: the mobile shell by crest on Monday September 05, 2016 @07:22AM (#12429519)
mosh $REMOTE -- tmux new -ADs $SESSION
Re:Mosh: the mobile shell by andrewl-hn on Monday September 05, 2016 @08:02AM (#12429677)
I would really love to see an adapter layer on top of Mosh, so that it can be a drop-in replacement for an SSH client. Currently even after you install it on your servers you have to change your scripts and learn new CLI options. I know that there are reasons for these differences, but inability to alias `ssh` to `mosh` or hypothetical `mosh-ssh` hurts adoption.
Re:Mosh: the mobile shell by StavrosK on Monday September 05, 2016 @08:09AM (#12429709)
What new CLI options? Mosh pretty much doesn't have any, you use SSH if you want to do what SSH does.
Re:Mosh: the mobile shell by PolCPP on Monday September 05, 2016 @10:12AM (#12430411)
Stuff like connecting to different port, you need to do --ssh="ssh -p 1111"
Re:Mosh: the mobile shell by StavrosK on Monday September 05, 2016 @02:36PM (#12431637)
Oh, that's because you're running SSH under the hood. I see what you mean, having the port be passed to SSH would be better from a UX standpoint, but the thing is that mosh doesn't do everything SSH does, so it would need to fake every SSH option and then pass them through. As it is, you only need to learn --ssh and you can do "--ssh=ssh -D 8223 -L 1234:localhost:1234" etc.
Re:Mosh: the mobile shell by cyphar on Monday September 05, 2016 @08:34AM (#12429827)
One of the weirdest issues I've had with Mosh is when you resize a window (for example you open a new pane in tmux where you have a mosh session open). Mosh will just cut off parts of the scrollback (if you do something like return from vim). Is this a known issue, or should I file a new bug?
Re:Mosh: the mobile shell by adrinavarro on Monday September 05, 2016 @09:21AM (#12430103)
mosh is really good when used from a tablet device, ie. with Blink: https://twitter.com/BlinkShell
Re:Mosh: the mobile shell by fungi on Monday September 05, 2016 @07:35AM (#12429564)
Makes managing a cheap European vps from Australia bearable.
Re:Mosh: the mobile shell by sschueller on Monday September 05, 2016 @07:38AM (#12429578)
While on a train going through a tunnel :) At least that is what I use it for in Switzerland :)
Re:Mosh: the mobile shell by LeonidasXIV on Monday September 05, 2016 @08:01AM (#12429672)
No internet in swiss tunnels? I'm a bit disappointed now.
Re:Mosh: the mobile shell by StavrosK on Monday September 05, 2016 @08:10AM (#12429713)
Yeah, the ISPs don't support tunnelling :(
Re:Mosh: the mobile shell by kefka on Monday September 05, 2016 @08:31AM (#12429808)
That was a very. Bad. Joke. :)

Bravo.

Re:Mosh: the mobile shell by exDM69 on Monday September 05, 2016 @09:08AM (#12430017)
It's amazing how well mosh can keep connections alive through network outages. I have unbearably unreliable mobile network connection and plain old SSH connections drop regularly but Mosh just keeps on going.

And it doesn't require me to reconnect when I enable/disable my work VPN.

Re:Mosh: the mobile shell by justinsaccount on Monday September 05, 2016 @09:29AM (#12430153)
> It's amazing how well mosh can keep connections alive through network outages

It doesn't. It uses udp, there is no connection to keep alive.

> And it doesn't require me to reconnect when I enable/disable my work VPN.

That's why this works.

Re:Mosh: the mobile shell by exDM69 on Monday September 05, 2016 @11:05AM (#12430673)
Yeah, yeah, I know that it works with UDP and what's happening.

What is amazing is how much it makes my day-to-day work with remote machines much more pleasant.

Re:Mosh: the mobile shell by homero on Monday September 05, 2016 @08:51AM (#12429920)
I love it but the clients I use don't support it. Winscp and serverauditor. I didn't like juicessh on Android
Re:Mosh: the mobile shell by michaelmior on Monday September 05, 2016 @09:30AM (#12430156)
I personally quite like JuiceSSH. Mosh support being one of the reasons :) It's great for the odd scenario when something is down and I need to a quick fix over 3G.
Re:Mosh: the mobile shell by atmosx on Monday September 05, 2016 @08:59AM (#12429958)
There was a FreeBSD bug in mosh, which led to high CPU usage which prevented me from trying it twice in the past.
Re:Mosh: the mobile shell by pixelbeat on Monday September 05, 2016 @08:15AM (#12429735)
mosh is fantastic for me when working remotely over vpn. I don't have to worry about reconnections, disconnections, packet lag (due to local echo feature). mosh in combination with screen (or tmux) gives scrollback support + other features
Re:Mosh: the mobile shell by tambourine_man on Monday September 05, 2016 @08:34AM (#12429832)
Re:Mosh: the mobile shell by abhinavk on Monday September 05, 2016 @12:56PM (#12431207)
With Chrome apps being phased out, is a native Windows app in the pipeline?