Live data from Hacker News

Mosh: the mobile shell

mosh.mit.edu

61–70 of 153 posts

Re: Mosh: the mobile shell

#61

I've had great success with using JuiceSSH[0] for mosh on Android. Great for those times something important comes up and I'm away from my desk. Trying to connect without mosh on mobile networks is pretty terrible. [0] https://juicessh.com/

Second this. Mosh + JuiceSSH + Bluetooth keyboard and you're good to go.

Re: Mosh: the mobile shell

#62
post #35

Earlier quoted context omitted.

Is mosh on top of screen or is screen on top of mosh? Serious question, since I share parent's love of mosh and frustration with the lack of scrollback.

Mosh to the server, then run screen/tmux there. You'll have to use the scroll features of screen/tmux. Running your stuff inside of screen/tmux is useful in any case.

As mentioned on the website, you can even attach to the screen directly from the mosh command:

    mosh pello -- screen -dr

Re: Mosh: the mobile shell

#64
post #34

autossh + tmux still. How are people getting around the lack of SSH agent forwarding?

I think "Not wanting to use SSH agent forwarding" is the answer. I don't want every single machine I use to be able to authenticate as me to anyone else. If I actually want to be able to connect to a third machine, I'll have an SSH key on the second machine. For instance, my phone has an SSH key to SSH/mosh to my VPS, and my VPS has a different SSH key that can authenticate to GitHub. If I suspect my VPS got compromised, I can kill its key on GitHub without having to worry about whether my single, master, local key got compromised. Given that ssh-keygen is so easy and basically every server I want to talk to supports multiple authorized_keys, I haven't seen much use for agent forwarding.

Also, mosh was developed at MIT, where there's a good Kerberos setup for most SSH-able machines. So if you really want forwarding, you can forward your Kerberos ticket with the initial SSH connection. The mosh-server command on Athena is actually a wrapper script that copies your Kerberos ticket (so it's not destroyed when the SSH session exits) and sets up a Kerberos + AFS session for the actual mosh-server to run inside:

http://web.mit.edu/mosh_project/arch/amd64_deb60/bin/mosh-se...

There's little use for key-based authentication on Athena, let alone agent forwarding, because if you don't forward Kerberos tickets, you don't have access to your network home directory.

Re: Mosh: the mobile shell

#66

Termux[0], the best Android terminal emulator (in my humble opinion), recently had mosh added to its' package repository. I currently use it and it's very nice. It makes me long for a better handheld though (my 4" Moto G screen is difficult to type on, even with Hacker's Keyboard). I can have tmux sessions running on servers with say, an irc client running, mosh in, chat away for a bit, turn it off, the irc client co…

Termux got me Emacs (that works, a very current version, and a lot more) on my Android phone. It's really nice, especially with a Bluetooth keyboard.

Re: Mosh: the mobile shell

#67
I tried to use mosh, but it turned on really bad mobile network even it was not helpful. What surprisingly worked OK was Emacs shell plus lsyncd. With that I type commands locally and send the whole line on Enter while lsync transparently syncs my edits of local files to the server. Then I can live with latencies of over a second.

Re: Mosh: the mobile shell

#69
I've used mosh on and off for the past year. For me, the best feature of mosh is the support for roaming. For the "persistence" aspect, SSH + remote screen is sufficient.

There was a point where I used mosh whether I was roaming or sitting at my desk, but eventually the friction of mosh made it only worthwhile to use in roaming situations. By "friction" I mean the small annoyances of (1) installing mosh on every new server, and (2) requiring the use of screen to get scrollback buffers. I frequently use screen in my workflows outside of mosh, so I would often end up in weird states where I moshed into a server and auto-attached to my dedicated "moshscreen," but then had to detach from it within the session to move to another screen that I wanted to use.

Because of those annoyances, I now just use simple SSH when sitting at my desk, and put any long-running commands into a remote screen. But mosh is still extremely useful in two narrow cases: train rides (moving between cell towers) and traveling in developing countries (high packet loss).

Re: Mosh: the mobile shell

#70

Earlier quoted context omitted.

I would say they're mostly orthogonal. I use mosh and screen.

That sounds like a scenario for long-form work over a mobile network (eg. on a laptop through a mobile hotspot). Mosh from a laptop is a no-go for me because there's no Windows-based, full-featured terminal emulator (saved sessions, auth agents, etc) that supports mosh.

I can second the suggestion of MobaXterm. I am using it quite a bit, and their support has been fairly responsive to questions. Not open source, but still seems like a good product.
Post reply on HN