Mosh for Android

549 views
Skip to first unread message

Bryan Venable

unread,
Apr 12, 2012, 8:43:03 AM4/12/12
to STL Mobile Dev
You may have heard of Mosh (mobile shell): "[a] remote terminal
application that allows roaming, supports intermittent connectivity,
and provides intelligent local echo and line editing of user
keystrokes. Mosh is a replacement for SSH. It's more robust and
responsive, especially over Wi-Fi, cellular, and long-distance links."

http://mosh.mit.edu/

It turns out Keegan McAllister (kmcallister on github) ported Mosh to
Android a few weeks ago, but ran into an issue with the pty not having
rows and columns set in their shell (I think it was through adb). I
figured out that this doesn't affect Terminal Emulator or Better
Terminal Emulator Pro, and it can be worked around using stty anyway.
I also wrote a shell script for the ssh wrapper that starts the Mosh
server (mosh-server) process on the remote host and gathers the port
and encryption key to pass to mosh-client. The default wrapper is
written in Perl and relies on IO::Pty which is apparently kind of
tricky to get onto Android. My wrapper works on non-rooted phones
with kbox installed, or on ROMs like CyanogenMod that already have
busybox and OpenSSH installed.

Details here:

https://github.com/keithw/mosh/issues/32

Next step might be to do a fork of ConnectBot, if possible, that
starts a pty and runs the wrapper. If that's not feasible, then a
different GUI from scratch might be needed, but that seems like
unnecessary duplication of effort if Mosh can be integrated into
ConnectBot.

Reply all
Reply to author
Forward
0 new messages