29

I was wondering if there's a way to use Mosh on windows without Cygwin?
I need to be able to put it on my USB drive and copy it over to a windows computer and be able to Mosh into one of my servers. Otherwise, is there a way to use Cygwin and have it portable? I did get mosh working under windows via Cygwin, but that meant I had to add an environment path to the windows computer, which, on the windows computer that I'm working on doesn't allow you to change that, since I don't have admin privileges.

oz123
  • 27,559
  • 27
  • 125
  • 187
mepmerp
  • 701
  • 1
  • 9
  • 16

5 Answers5

27

MobaXTerm is portable and supports Mosh. It works quite well. I spent all day using it on a very dodgy connection and it worked like a charm.

Just get the most recent version and from the Session menu select Mosh. It did does not support IPv6 (at least in Version 9.2 (2016-09-18)):

Bugfix: Mosh sessions are forced to IPv4 only (IPv6 is not yet supported by Mosh client/server)

But it might work now, since Version 10.4 (untested):

We also improved MobaXterm behavior and fixed issues with multi-monitors, IPv6 connections, mouse scrolling and keyboard shortcuts.

Michael Mior
  • 28,107
  • 9
  • 89
  • 113
Frames Catherine White
  • 27,368
  • 21
  • 87
  • 137
  • How did you do this? I downloaded Moba-xterm and copied the Mosh plugin to the same directory as the Moba executable. I dont see any mosh option in the Moba-xterm – Abhishek Anand Feb 26 '14 at 05:49
  • I get an error (------ denotes newline; sorry) : [Abhishek.abhishek-vaio] ➤ mosh --------- bash: mosh: command not found ----------- [2014-02-26 12:34.06] ~ [Abhishek.abhishek-vaio] ➤ ls /drives/c/Program\ Files\ \(x86\)/Mobatek/MobaXterm\ Personal\ Edition/ -------- MobaXterm.exe Mosh.mxt3 – Abhishek Anand Feb 26 '14 at 07:07
  • You need to copy the plugin from the link above into the directory where the moba-xterm exe is. – bill davis Mar 01 '14 at 18:21
  • 4
    No need to download the plugin anymore: Mosh is now fully integrated in the new version of MobaXterm (in the sessions manager), and it works great! – Didier Apr 13 '14 at 12:15
  • 1
    MobaXterm is awesome! Never heard about it before...Thx!! – imbr Feb 16 '21 at 16:26
  • I like MobaXterm, but what drove me away in 2021 is the missing support of mosh+ipv6. Is it supported now? – Hangchen Yu Nov 10 '22 at 22:00
8

Interestingly enough, I wanted MOSH for Windows too, and I find Cygwin to be very messy. Instead, I just downloaded a minimal Text-only Debian distribution, booted it up in VirtualBox, and installed MOSH. Surprisingly, it's much less time consuming and requires less tweaking than going the Cygwin route, and makes less modifications to the host machine.

In fact, there is a portable VirtualBox, so you can put your MOSH VM and Portable VirtualBox on a memory stick.

I haven't even tried to optimize things, but it runs just fine on the 256MB of ram I gave it. It would probably run just fine on 64MB or less.

I do hope MOSH will be built into PuTTY/KiTTY in the future.

Noah
  • 998
  • 1
  • 12
  • 22
8

I have noticed that a new version of MobaXterm has been released (version 7.1) and includes an intergrated Mosh session. So, you dot not need anymore need plugin for that.

They said that it is "experimental", but I have tested it, and it is working quite well.

PaulLanobre
  • 243
  • 4
  • 6
5

As of now, Mosh has added support for Google Chrome (or any of Chromium Browsers) as an official extension. So you can keep a portable google chrome & use mosh from there.

Ayush
  • 3,695
  • 1
  • 32
  • 42
1

For Windows, there isn't a single solution install to support MOSH. Rather, you have to sort of "stitch together" a few options to make it work.

MOSH itself does not need ssh or any other initial program necessarily. It is possible to start a session on your server, then using the published connection information, go to your client (in this case your windows box) and use that information to connect the session. This is sort of messy and is the main reason people use SSH to basically establish a connection to the server, remotely start a MOSH server, get the session information back to your client machine, then launch the MOSH experience.

The two pieces you need on the client side (if you make the connection manually) are the server port number and symmetric encryption key. A typical example of one given by a MOSH server would be:

MOSH CONNECT 60001 U0MWPbwn3BdcdMyNLnSFCA

Where 60001 is my port number and "U0...CA" is my encryption key. Don't ever give this out BTW as ANYONE can connect to your running MOSH server with this information (that is, they would look just like an IP change just like you do when you get disconnected and reconnected)

So, back to installation. MobaXterm (currently at v10.5) is a free for personal use app that you can find at https://mobaxterm.mobatek.net/. Installation is relatively straight forward. One word of caution however, their SSH implementation is rudimentary. Basically they support password authentication for ssh. If you use public keys, you cannot have one with a password on it and expect it to work (the code to ask you for your password appears to be missing). This might not be a show stopper for everyone but this is where my company stopped following this thread.

Within MobiXTerm, you want to hit the "Sessions" button at the top left to bring up a new session window. Press the Mosh button on the top right to get the start of your session (NOTE: This is IPv4 only. Zippo luck on getting IPv6 with this to work). Enter your remote host and the username of the ssh account you will be using. If you have an unsigned ssh key, then you can use the Advanced Mosh setting to link that private key with this session (at this point, as a security guy, I'm sort of passing out). At this point, as long as mosh is correctly running on your server (with the 60000-61000 UDP ports open in the server firewall), things should "just work".

Ok, so its not too painful to get working this way. But other than terminal functionality, its not very much fun either. Although MobiXterm is an X-server, I haven't yet gotten X to function over the mobi connection (at least not automatically).

Marcos
  • 11
  • 2