forked from mobile-shell/mobile-shell.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1228 lines (997 loc) · 54.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Mosh: the mobile shell</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Mobile shell that supports roaming and intelligent local echo. Like SSH secure shell, but allows mobility and more responsive and robust.">
<meta name="author" content="Keith Winstein <mosh-devel@mit.edu>">
<link rel="canonical" href="https://mosh.org" />
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30270105-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body data-spy="scroll">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Mosh</a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="#about">About</a></li>
<li><a href="#news">News</a></li>
<li><a href="#getting">Getting Mosh</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#techinfo">Technical Info</a></li>
<li><a href="#faq">FAQ</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="https://github.com/mobile-shell/mosh">Mosh on GitHub</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container">
<section id="about">
<div class="hero-unit span10">
<div class="row">
<div class="span5">
<h1>Mosh</h1>
<h2>(mobile shell)</h2>
<p>Remote terminal application that
allows <strong class="callout">roaming</strong>, supports <strong class="callout">intermittent connectivity</strong>, and provides intelligent <strong class="callout">local echo</strong> and line editing of user keystrokes.</p>
<p>Mosh is a replacement for SSH. It's more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.</p>
<p>Mosh is free software, available for GNU/Linux, BSD, macOS, Solaris, Android, and Chrome. An iOS version is in testing.</p>
</div>
<div class="span5"><img src="mosh.png" style="max-width:120%;" alt="">
</div>
</div>
<p><a class="btn btn-primary btn-large" href="#getting">Getting Mosh »</a>
<a class="btn btn-primary btn-large" href="#techinfo">Tech Video »</a></p>
</div>
<div id="features">
<div class="row-fluid">
<div class="feature span3">
<h2 class="callout">Change IP. Stay connected.</h2>
<p>Mosh automatically roams as you move between Internet
connections. Use Wi-Fi on the train, Ethernet in a hotel,
and LTE on a beach: you'll stay logged in. Most network
programs lose their connections after roaming,
including SSH and Web apps like Gmail. Mosh
is different.</p>
</div>
<div class="feature span3">
<h2 class="callout">Makes for sweet dreams.</h2>
<p>With Mosh, you can put your laptop to sleep and wake it
up later, keeping your connection intact. If your
Internet connection drops, Mosh will warn you — but
the connection resumes when network service
comes back.</p>
</div>
<div class="feature span3">
<h2 class="callout">Get rid of network lag.</h2>
<p>SSH waits for the server's reply before showing you your
own typing. That can make for a lousy user interface. Mosh
is different: it gives an instant response to typing,
deleting, and line editing. It does this adaptively and
works even in full-screen programs like emacs and vim. On
a bad connection, outstanding predictions are underlined
so you won't be misled.
</p>
</div>
<div class="feature span3">
<h2 class="callout">No privileged code. No daemon.</h2>
<p>You don't need to be the superuser to install or run
Mosh. The client and server are executables run by an
ordinary user and last only for the life of the
connection.</p>
</div>
</div>
<div class="row-fluid">
<div class="feature span3">
<h2 class="callout">Same login method.</h2>
<p>Mosh doesn't listen on network ports or authenticate
users. The <span style="font-family: monospace">mosh</span> client logs in to the server via
SSH, and users present the same credentials (e.g.,
password, public key) as before. Then Mosh runs the
<span style="font-family: monospace">mosh-server</span> remotely and connects to it over UDP.</p>
</div>
<div class="feature span3">
<h2 class="callout">Runs inside your terminal, but better.</h2>
<p>Mosh is a command-line program, like ssh. You can use it
inside xterm, gnome-terminal, urxvt, Terminal.app, iTerm,
emacs, screen, or tmux. But mosh was designed from scratch
and supports just one character set: UTF-8. It fixes Unicode
bugs in other terminals and in SSH.</p>
</div>
<div class="feature span3">
<h2 class="callout">Control-C works great.</h2>
<p>Unlike SSH, mosh's UDP-based protocol handles packet loss
gracefully, and sets the frame rate based on network conditions. Mosh
doesn't fill up network buffers, so Control-C always works
to halt a runaway process.</p>
</div>
</div>
</div>
</section>
<section id="news">
<div class="page-header">
<h1>Recent News</h1>
</div>
<ul id="news-list">
<li><b>August 10,
2016</b>: <a href="https://mailman.mit.edu/pipermail/mosh-users/2016-August/000330.html">Mosh
1.2.6 released</a>, with John Hood as release lead. New features
include huge performance improvements, especially on large terminals,
the ability to set a timeout to end dormant sessions automatically,
and support for crypto libraries other than OpenSSL.</li>
<li><b>August 10, 2016</b>: The Mosh website moves to <a href="https://mosh.org">https://mosh.org</a>. We continue to be grateful for hosting provided
by the MIT <a href="https://sipb.mit.edu">Student Information Processing Board</a>.</li>
<li><b>June 15, 2016</b>: <a href="https://github.com/blinksh/blink">Mosh for iOS (Blink)</a> has its first <a href="https://mailman.mit.edu/pipermail/mosh-devel/2016-June/001339.html">alpha release</a>.
<li><b>April 17, 2016</b>: <a href="https://play.google.com/store/apps/details?id=com.termux">Termux</a> (open source Linux environment for Android) adds a mosh 1.2.5 package.</li>
<li><b>July 23, 2015</b>: <a href="https://mailman.mit.edu/pipermail/mosh-users/2015-July/000283.html">Mosh 1.2.5 released</a>, with John Hood as release lead. New features include support for mouse modes and a reconfigurable escape character, and initial support for IPv6.</li>
<li><b>May 31, 2015</b>: Another team of Stanford students has <a href="https://reproducingnetworkresearch.wordpress.com/2015/05/31/cs244-15-mosh-reproducing-network-research-results/">reproduced some of the Mosh research paper's results</a>.
<li><b>January 20, 2014</b>: <a href="https://github.com/rpwoodbu/mosh-chrome/wiki">Mosh for Chrome</a>, which brings Mosh to the Chrome browser and Chrome OS, is released. It can be installed <a href="https://chrome.google.com/webstore/detail/mosh/ooiklbnjmhbcgemelgfhaeaocllobloj">here</a>.</li>
<li><b>August 9, 2013</b>: <a href="https://play.google.com/store/apps/details?id=com.sonelli.juicessh">JuiceSSH</a> (SSH client for Android) adds official Mosh support — available on the <a href="https://play.google.com/store/apps/details?id=com.sonelli.juicessh">Play Store</a></li>
<li><b>April 14, 2013</b>: Mosh has posted an <a href="https://docs.google.com/document/d/10o-TLA03bY4cZzEIZR-5wKmBecvYKpOEFRqSJFbIm3M/edit?usp=sharing">Ideas List</a> for interested contributors!</li>
<li><b>March 27,
2013</b>: <a href="https://mailman.mit.edu/pipermail/mosh-users/2013-March/000167.html">Mosh
1.2.4 has been released</a>. Changes largely include bug
fixes, improved robustness, and added platform support (now
on AIX and stock Solaris!). This version will be in Ubuntu
13.04 (raring).</li>
<li><b>March 24, 2013</b>: The <a href="https://twitter.com/zacchiro/status/315893796695064576">Debian Project Leader switches to Mosh</a>. Welcome, Stefano! We're proud to have you.</li>
<li><b>March 14, 2013</b>: Two teams of Stanford students have
reproduced parts of the <a href="https://mosh.org/mosh-paper.pdf">Mosh research paper</a> on Stanford's
<a href="https://reproducingnetworkresearch.wordpress.com">Reproducing Network Research blog</a>. Kanthi Nagaraj and Emily McMilin <a href="https://reproducingnetworkresearch.wordpress.com/2013/03/14/mosh-cs244-13/">tested SSP's resilience to packet loss</a>, and Ahmed Aljunied and Anand Atreya <a href="https://reproducingnetworkresearch.wordpress.com/2013/03/13/cs244-2013-evaluation-of-mosh-mobile-shell-performance-results/">evaluated Mosh's predictive local echo</a>.
<li><b>March 12, 2013</b>: Mosh celebrates its first anniversary of
1.0. Hard to believe it's already been a year. We could not have done
it without the hard work of many of you, especially Hari Balakrishnan,
Keegan McAllister, Anders Kaseorg, Quentin Smith, Richard Tibbetts,
Nelson Elhage, Christine Spang, Stefie Tellex, Joseph Sokol-Margolis,
Waseem Daher, Bill McCloskey, Austin Roach, Greg Hudson, Karl Ramm,
Alexander Chernyakhovsky, Peter Iannucci, Evan Broder, Neha Narula,
Katrina LaCurts, Ramesh Chandra, Peter Jeremy, Ed Schouten, Ryan
Steinmetz, Jay Freeman, Dave Täht, Larry Doolittle, Daniel Drown, Timo
Juhani Lindfors, Timo Sirainen, Ira Cooper, Felix Gröbert, Luke
Mewburn, Anton Lundin, Kevin Ballard, and Axel Beckert!</li>
<li><b>November 2012</b>: Mosh on the cover of <a href="http://www.linux-magazine.com/Issues/2012/144/Mosh-and-AutoSSH">Linux Magazine</a>.
<li><b>Oct. 19,
2012</b>: <a href="https://mailman.mit.edu/pipermail/mosh-users/2012-October/000152.html">Mosh
1.2.3 has been released</a>. Changes include more resilience to
evil NATs, power savings for mobile clients, switching to OpenSSL's AES
implementation, and a licensing exception to allow Mosh on Apple's app store.
This version will be in Debian 7.0 (wheezy).
<li><b>Aug. 22, 2012</b>: Mosh (and its tolerance for high
packet loss) helps Iain Learmonth <a href="elevator.txt">escape from an elevator</a>.
</ul>
</section>
<section id="getting">
<div class="page-header">
<h1>Getting Mosh</h1>
<p>The Mosh package should be installed on both the client and server. Please find your platform below for installation instructions.</p>
<h2 id="binaries">Install from your package manager</h2>
</div>
<!-- OSX / Darwin -->
<div class="row">
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.apple.com"><img class="logo" src="macosx.png" alt=""></a>macOS <small>10.9 or later</small></h3>
<div class="prelike">Binary package: <a href="https://mosh.org/mosh-1.2.6.pkg"><img src="dmg.png" alt=""> mosh-1.2.6.pkg</a>.</div>
<!-- <br />
<div class="prelike">OS X 10.5–10.9: <a href="https://mosh.org/mosh-1.2.5-leopard.pkg"><img src="dmg.png" alt=""> mosh-1.2.5-leopard.pkg</a>.</div> -->
<p><small>This is a standalone OS X package that will work on any supported Macintosh. However, if you are using a package manager such as Homebrew or MacPorts, we suggest using it to get Mosh, for better compatibility and automatic updates.</small></p>
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://mxcl.github.io/homebrew/"><img class="logo" src="homebrew2.png" alt=""></a>Homebrew <small>OS X 10.5 or later</small></h3>
<pre>$ brew install mobile-shell</pre>
<br />
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.macports.org"><img class="logo" src="macports.png" alt=""></a>MacPorts <small>OS X 10.5 or later</small></h3>
<pre>$ sudo port install mosh</pre>
<br />
</div>
</div>
<!-- Windows -->
<div class="row">
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><img class="logo" src="windows.png" alt="">Windows</h3>
<div class="prelike">
<img src="mosh-chrome.png" alt="" style="height: 24px; width: 24px; display:inline-block; vertical-align:middle">
Install <a href="https://chrome.google.com/webstore/detail/mosh/ooiklbnjmhbcgemelgfhaeaocllobloj">Mosh for Chrome.</a>
</div>
<p><small>There is no "native" mosh executable for Windows available at this time. The <a href="https://chrome.google.com/webstore/detail/mosh/ooiklbnjmhbcgemelgfhaeaocllobloj">Chrome version of Mosh</a> is the easiest way to use mosh on Windows.</small></p>
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.cygwin.com"><img class="logo" src="Cygwin_logo.svg" width="50" height="50" alt=""></a>Cygwin</h3>
<pre>C:\> setup.exe -q mobile-shell</pre>
<p><small>Mosh on Cygwin uses OpenSSH and is suitable for Windows users with advanced SSH configurations.
<br />
Mosh is not compatible with Cygwin's built-in Windows Console terminal emulation. You will need to run Mosh from a full-featured terminal program such as mintty, rxvt, PuTTY, or an X11 terminal emulator.</small></p>
</div>
</div>
<!-- Google / Mobile platforms -->
<div class="row">
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.android.com/"><img class="logo" src="Android_Robot_100.png" alt=""></a>Android</h3>
<div class="prelike">
<img src="JuiceSSH.png" alt="" style="height: 24px; width: 24px; display:inline-block; vertical-align:middle">
<a href="https://play.google.com/store/apps/details?id=com.sonelli.juicessh">Install JuiceSSH from the Play Store</a>
<br /><br />
or...<br />
<br />
<img src="assets/img/termux.png" alt="" style="height: 24px; width: 24px; display:inline-block; vertical-align:middle">
<a href="https://play.google.com/store/apps/details?id=com.termux">Install Termux from the Play Store</a></div>
<br />
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.google.com/chrome"><img class="logo" src="chrome.png" alt=""></a>Chrome / Chrome OS</h3>
<div class="prelike">
<img src="mosh-chrome.png" alt="" style="height: 24px; width: 24px; display:inline-block; vertical-align:middle">
Install <a href="https://chrome.google.com/webstore/detail/mosh/ooiklbnjmhbcgemelgfhaeaocllobloj">Mosh for Chrome.</a>
</div>
</div>
</div>
<!-- Linux -->
<div class="row">
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://alpinelinux.org"><img class="logo" src="alpinelinux-logo.png" alt=""></a>Alpine Linux</h3>
<pre># apk add mosh</pre>
<br />
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.archlinux.org"><img class="logo" src="arch.png" alt=""></a> Arch Linux</h3>
<pre># pacman -S mosh</pre>
<br />
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.debian.org"><img class="logo" src="debian.png" alt=""></a>Debian <small>squeeze-backports and later</small><br /></h3>
<pre>$ sudo apt-get install mosh</pre>
</div>
</div>
<div class="row">
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://getfedora.org"><img class="logo" src="fedora.png" alt=""></a>Fedora <small>15 or later</small></h3>
<pre>$ sudo yum install mosh</pre>
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.gentoo.org"><img class="logo" src="gentoo.png" alt=""></a> Gentoo</h3>
<pre># emerge net-misc/mosh</pre>
<br />
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.opensuse.org"><img class="logo" src="openSUSE.png" alt=""></a> openSUSE <small>12.3 or later</small></h3>
<pre>$ sudo zypper in mosh</pre>
<br />
</div>
</div>
<div class="row">
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="http://www.ubuntu.com"><img class="logo" src="ubuntu.png" alt=""></a>Ubuntu <small>12.04 and later</small></h3>
<pre>$ sudo apt-get install mosh</pre>
<p><small>The <a href="https://launchpad.net/~keithw/+archive/ubuntu/mosh-dev">ppa:keithw/mosh-dev</a> PPA tracks the development version of Mosh.</small></p>
<br />
</div>
</div>
<!-- *BSD -->
<div class="row">
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.freebsd.org"><img class="logo" src="freebsd.png" alt=""></a> FreeBSD</h3>
<pre># pkg install net/mosh</pre>
<br />
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.openbsd.org"><img class="logo" src="ppuf100X91.gif" alt=""></a>OpenBSD</h3>
<pre># pkg_add mosh</pre>
<br />
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.netbsd.org"><img class="logo" src="NetBSD-smaller-tb.png" alt=""></a>NetBSD <small>(pkgsrc)</small></h3>
<pre># cd net/mosh; make install clean</pre>
</div>
</div>
<!-- Other UNIXes -->
<div class="row">
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.opencsw.org"><img class="logo" src="opencsw.png" alt=""></a>OpenCSW <small>Solaris 10 Update 8 or later</small></h3>
<pre># pkgutil -i mosh</pre>
<br />
</div>
<div class="span4" style="vertical-align: top;">
<h3 class="callout"><a href="https://www.openindiana.org"><img class="logo" src="OI_logo.png" alt=""></a>OpenIndiana <small>OpenIndiana (Hipster release)</small></h3>
<pre># pfexec pkg install -v mosh</pre>
<br />
</div>
</div>
<p><small>Operating system logos are trademarks or registered trademarks and are displayed for identification
only. The vendors shown aren't affiliated with and haven't endorsed Mosh.</small></p>
<div id="build-instructions" class="page-header">
<h2>Building from source</h2>
</div>
<div class="row-fluid">
<div class="span8">
<div class="row-fluid">
<div class="span6">
<h3 class="callout">Latest release</h3><br>
<p>Extract <a href="//mosh.org/mosh-1.2.6.tar.gz">mosh-1.2.6.tar.gz</a>, then</p>
<pre>$ cd mosh-1.2.6
$ ./configure
$ make
# make install</pre>
</div>
<div class="span6">
<h3 class="callout">Compiling from Git</h3><br>
<pre>$ git clone <a href="https://github.com/mobile-shell/mosh">https://github.com/mobile-shell/mosh</a>
$ cd mosh
$ ./autogen.sh
$ ./configure
$ make
# make install</pre>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<h3 class="callout">Dependencies</h3><br>
<table class="table table-striped" style="width: 100%;">
<thead><tr><th>Name</th><th>Typical package</th></tr></thead>
<tr class="deps"><td><a href="https://github.com/google/protobuf">Protocol Buffers</a></td><td>protobuf-compiler, libprotobuf-dev</td></tr>
<tr><td>ncurses</td><td>libncurses5-dev</td></tr>
<tr><td>zlib</td><td>zlib1g-dev</td></tr>
<tr><td>utempter (optional)</td><td>libutempter-dev</td></tr>
<tr><td>OpenSSL</td><td>libssl-dev</td></tr>
</table>
</div>
</div>
</div>
<div class="span4">
<div class="well well-large">
<h3 class="callout">Security on new operating systems</h3><br>
<p>
Note that <code>mosh-client</code> receives an AES session key as an environment
variable. If you are porting Mosh to a new operating system, please make sure that a
running process's environment variables are not readable by other users. We have
confirmed that this is the case on GNU/Linux, OS X, and FreeBSD.
</p>
</div>
</div>
</div>
</section>
<section id="usage">
<div class="page-header">
<h1>Usage</h1>
</div>
<h3 class="callout">Replaces interactive SSH. Instant keystroke response, robust to roaming. <small>But you'll need working UDP.</small></h3>
<div class="row">
<div class="well span3 offset2">
<h2 class="callout" style="color: darkblue;">Typical usage</h2>
<pre>$ mosh <i>chewbacca.norad.mil</i></pre>
<p>Mosh will log the user in via SSH, then start a connection on a UDP port between 60000 and 61000.</p>
</div>
<div class="span4">
<h3 class="callout">Different username</h3>
<pre>$ mosh <b>potus@</b><i>ackbar.bls.gov</i></pre>
</div>
<div class="span4">
<h3 class="callout">Server binary outside path</h3>
<pre>$ mosh <b>--server=/tmp/mosh-server</b> <i>r2d2</i></pre>
<p>The user can specify an alternate path for the <code>mosh-server</code> on the remote host. The server binary can even
be installed in the user's home directory.</p>
</div>
</div>
<div class="row">
<div class="span4">
<h3 class="callout">Selecting Mosh UDP port</h3>
<pre>$ mosh <b>-p 1234</b> <i>darth</i></pre>
<p>Useful when the server is behind a port-forwarder or NAT.</p>
</div>
<div class="span4">
<h3 class="callout">Selecting SSH port</h3>
<pre>$ mosh <b>--ssh="ssh -p 2222"</b> <i>figrindan</i></pre>
</div>
<div class="span4">
<h3 class="callout">Other SSH options</h3>
<pre>$ mosh <b>--ssh="~/bin/ssh -i ./identity"</b> <i>fett</i></pre>
</div>
</div>
<div class="row">
<div class="span4">
<h3 class="callout">Disable instant echo</h3>
<pre>$ mosh <b>--predict=never</b> <i>niennunb</i></pre>
<p>The <code>-n</code> switch is a synonym. By contrast,
passing <code style="white-space: nowrap;">--predict=always</code> or <code>-a</code>
will enable instant local echo even on low-delay
links.</p>
</div>
<div class="span4">
<h3 class="callout">With a command</h3>
<pre>$ mosh <i>pello</i> <b>-- screen -dr</b></pre>
<p>This reattaches to a long-running screen session.</p>
</div>
</div>
<h3 class="callout">Ending the connection</h3>
<p>Normally, <span style="font-family: monospace">logout</span> or <span style="font-family: monospace">exit</span> on the remote host will close
the session. Mosh accepts the escape sequence <code>Ctrl-^
.</code> (typically typed with Control-Shift-6, then a
period) to end the connection forcibly. To send a
literal Ctrl-^, type <code>Ctrl-^ ^</code>.</p>
<h3 class="callout">Manual</h3>
<p>More details can be found in
the <code>mosh(1)</code>, <code>mosh-client(1)</code>,
and <code>mosh-server(1)</code> manual pages.</p>
</section>
<section id="techinfo">
<div class="page-header">
<h1>Technical Info</h1>
</div>
<h2 class="callout">Papers</h2>
<div class="row">
<div class="span4">
<p>The <a href="mosh-paper.pdf"><img style="padding: 3px;"
src="pdf.png" alt=""> Mosh research paper</a> describes the
design and evaluation of Mosh in more detail than you may
want.
The paper was presented at the
<a href="https://www.usenix.org/conference/atc12/tech-schedule/usenix-atc-12-technical-sessions">2012 USENIX
Annual Technical Conference</a>, held June 13–15, 2012, in
sunny Boston, Mass.</p>
<p>In addition,
the <a href="https://www.usenix.org/system/files/login/articles/winstein.pdf"><img style="padding:
3px;" src="pdf.png" alt=""> Mosh: A State-of-the-Art Good
Old-Fashioned Mobile Shell</a> essay gives further information about
the design principles behind Mosh, including the "prophylactic
retransmission" technique. The essay was published
in <a href="https://www.usenix.org/publications/login">USENIX
;login:</a> magazine, August 2012.</p>
<div class="well"><h3 class="lead">“ISO 2022 locking escape
sequences oh flying spaghetti monster please kill me
now.” <br/><small>— actual USENIX peer review from the
Mosh paper.</small>
</h3>
<p>(Why you should trust Mosh with your remote terminal needs: we
worry about details so obscure, even USENIX reviewers don't want to
hear about them.)</p>
</div>
</div>
<div class="span8">
<iframe width="560" height="315" src="https://www.youtube.com/embed/XsIxNYl0oyU?rel=0" style="border: none" allowfullscreen></iframe>
</div>
</div>
<h2 class="callout">How Mosh works</h2>
<div class="row">
<div class="span8">
<p>Remote-shell protocols traditionally work by conveying a
byte-stream from the server to the client, to be interpreted
by the client's terminal. (This includes TELNET, RLOGIN, and
SSH.) Mosh works differently and at a different layer. With
Mosh, the server and client both maintain a snapshot of
the current screen state. The problem becomes one of
state-synchronization: getting the client to the
most recent server-side screen as efficiently as
possible.</p>
<p>This is accomplished using a new protocol called the
<strong>State Synchronization Protocol</strong>, for which Mosh is the
first application. SSP runs over UDP, synchronizing the
state of any object from one host to another. Datagrams
are encrypted and authenticated
using <a href="http://www.cs.ucdavis.edu/~rogaway/ocb/">AES-128
in OCB mode</a>. While SSP takes care of the networking
protocol, it is the implementation of the object being
synchronized that defines the ultimate semantics of the
protocol.</p>
<p>Roaming with SSP becomes easy: the client sends datagrams
to the server with increasing sequence numbers, including
a "heartbeat" at least once every three seconds. Every time
the server receives an authentic packet from the client
with a sequence number higher than any it has previously
received, the IP source address of that packet becomes the
server's new target for its outgoing packets. By doing
roaming “statelessly” in this manner, roaming works in and
out of NATs, even ones that may themselves be
roaming. Roaming works even when the client is not aware
that its Internet-visible IP address has changed. The
heartbeats allow Mosh to inform the user when it hasn't
heard from the server in a while (unlike SSH, where users
may be unaware of a dropped connection until they try to
type).</p>
<p>Mosh runs two copies of SSP, one in each direction of the
connection. The connection from client to server
synchronizes an object that represents the keys typed by
the user, and with TCP-like semantics. The connection from
server to client synchronizes an object that represent the
current screen state, and the goal is always to convey the
client to the most recent server-side state, possibly
skipping intermediate frames.</p>
<p>Because SSP works at the object layer and can control the
rate of synchronization (in other words, the frame rate),
it does not need to send every byte it receives from the
application. That means Mosh can regulate the frames so as
not to fill up network buffers, retaining the
responsiveness of the connection and making sure Control-C
always works quickly. Protocols that must send every byte
can't do this.</p>
<h3 class="callout">Careful terminal emulation</h3>
<p>One benefit of working at the terminal layer
was the opportunity to build a clean UTF-8 terminal
emulator from scratch. Mosh fixes several Unicode bugs in
existing terminals and in SSH, and was designed as a fresh
start to try to be robust and correct even for
pathological inputs.</p>
<dl>
<dt>Tricky unicode</dt>
<dd><p>Only Mosh and the OS X Terminal correctly handle a Unicode combining character in the first column.</p>
<div class="thumbs">
<div class="row">
<div class="span4"><img src="terminal-shots/firstcol-xterm.png.2.png" alt=""><br>xterm: circumflex on wrong letter.</div>
<div class="span4"><img src="terminal-shots/firstcol-gnome.png.2.png" alt=""><br>GNOME Terminal: no circumflex at all.</div>
</div>
<div class="row">
<div class="span4"><img src="terminal-shots/firstcol-osx.png.2.png" alt=""><br>OS X Terminal.app gets it right.</div>
<div class="span4"><img src="terminal-shots/firstcol-mosh.png.2.png" alt=""><br>Mosh gets it right too.</div>
</div>
</div>
</dd>
<dt>ISO 2022 locking escapes</dt>
<dd><p>Only Mosh will never get stuck in hieroglyphs when a nasty program writes to the terminal. (See Markus Kuhn's discussion of the relationship between
<a href="https://www.cl.cam.ac.uk/~mgk25/unicode.html#term">ISO 2022 and UTF-8</a>.)</p>
<div class="thumbs">
<div class="row">
<div class="span4"><img src="terminal-shots/acs-xterm.png.2.png" alt=""><br>xterm</div>
<div class="span4"><img src="terminal-shots/acs-gnome.png.2.png" alt=""><br>GNOME Terminal</div>
</div>
<div class="row">
<div class="span4"><img src="terminal-shots/acs-osx.png.2.png" alt=""><br>OS X Terminal.app</div>
<div class="span4"><img src="terminal-shots/acs-mosh.png.2.png" alt=""><br>Mosh</div>
</div>
</div>
</dd>
<dt>Evil escape sequences</dt>
<dd><p>Only Mosh and GNOME Terminal have a defensible rendering when
Unicode mixes with an ECMA-48/ANSI escape sequence. The OS X Terminal
unwisely tries to normalize its input before the vt500 state machine,
causing it to misinterpret and become unusable after receiving the
following input!* (This also means the OS X Terminal's interpretation
of the incoming octet stream <strong>varies</strong> depending on how
the incoming octets are split across TCP segments, because the
normalization only looks ahead to available bytes.)</p>
<p><small>* We earlier wrote that this misbehaving sequence "crashes"
the OS X Terminal.app. This was mistaken—instead, Terminal.app
interprets the escape sequence as shutting off keyboard input, and
because of an unrelated bug in Terminal.app, it is not possible for
the user to restore keyboard input by resetting the terminal from the
menu.</small></p>
<div class="thumbs">
<div class="row">
<div class="span4"><img src="terminal-shots/unicode-and-escape-xterm.png.2.png" alt=""><br>xterm: circumflex on wrong letter.</div>
<div class="span4"><img src="terminal-shots/unicode-and-escape-gnome.png.2.png" alt=""><br>GNOME Terminal's circumflex placement is defensible.</div>
</div>
<div class="row">
<div class="span4"><img src="terminal-shots/unicode-and-escape-osx.png.2.png" alt=""><br>OS X Terminal.app applies circumflex to part of escape sequence, then irretrievably shuts off keyboard input.</div>
<div class="span4"><img src="terminal-shots/unicode-and-escape-mosh.png.2.png" alt=""><br>Mosh gets this one right.</div>
</div>
</div>
</dd>
<dt>Mosh sets IUTF8</dt>
<dd><p>In the POSIX framework, the kernel needs to know whether
the user is typing in an 8-bit character set or in UTF-8,
because in canonical mode (i.e. "cooked" mode), the kernel
needs to be able to delete a typed multibyte character
sequence from an input buffer. On OS X and Linux, this is
done with the "IUTF8" termios flag.)
(See <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665757">diagnostic
explaining the need for this flag.</a>)</p>
<p>Mosh sets the IUTF8 flag when possible and stubbornly refuses to start up unless the user has a
UTF-8-clean environment. SSH does not set the IUTF8 flag, which can lead to garbage in input buffers.</p>
</dd>
</dl>
<h3 class="callout">Instant local echo and line editing</h3>
<p>The other major benefit of working at the
terminal-emulation layer is that the Mosh client is free
to scribble on the local screen without lasting
consequence. We use this to implement intelligent local
echo. The client runs a predictive model in the background
of the server's behavior, hypothesizing that each
keystroke will be echoed at the cursor location and that
the backspace and left- and right-arrow keys will have
their traditional effect. But only when a prediction is
confirmed by the server are these effects actually shown
to the user. (In addition, by default predictions are only
displayed on high-delay connections or during a network
“glitch.”) Predictions are done in epochs: when the
user does something that might alter the echo behavior
— like hit ESC or carriage return or an up- or
down-arrow — Mosh goes back into making background
predictions until a prediction from the new batch can be
confirmed as correct.</p>
<p>Thus, unlike previous attempts at local echo with TELNET
and RLOGIN, Mosh's local echo can be used everywhere, even
in full-screen programs like emacs and vi.</p>
<h3 class="callout">Real-world benefits</h3>
<p>We evaluated Mosh using traces contributed by six users, covering
about 40 hours of real-world usage and including 9,986 total
keystrokes. These traces included the timing and contents of all
writes from the user to the host and vice versa. The users were asked
to contribute "typical, real-world sessions." In practice, the traces
include use of popular programs such as the bash shell and zsh shells,
the alpine and mutt e-mail clients, the emacs and vim text editors,
the irssi and barnowl chat clients, the links text-mode Web browser,
and several programs unique to each user.</p>
<p>To evaluate typical usage of a "mobile" terminal, we replayed the
traces over an otherwise unloaded Sprint commercial EV-DO (3G)
cellular Internet connection in Cambridge, Mass. A client-side process
played the user portion of the traces, and a server-side process
waited for the expected user input and then replied (in time) with the
prerecorded server output. We speeded up long periods with no
activity. The average round-trip time on the link was about half a
second.</p>
<p>We replayed the traces over two different transports, SSH and Mosh,
and recorded the user interface response latency to each simulated
user keystroke. The Mosh predictive algorithm was frozen prior to
collecting the traces and was not adjusted in response to their
contents or results.</p>
<h4>The results</h4>
<div>
<img src="cdfs.png" alt="">
<h4 class="callout">Cumulative distribution of keystroke response times with Sprint EV-DO (3G) Internet service</h4>
</div>
<br/>
<p>Mosh reduced the median keystroke response
time from 503 ms to nearly instant (because more than 70% of the
keystrokes could be immediately displayed), and reduced the mean
keystroke response time from 515 ms to 173 ms. Qualitatively, Mosh makes
remote servers "feel" more like the local machine!</p>
</div>
</div>
</section>
<section id="faq">
<div class="page-header">
<h1>Frequently Asked Questions</h1>
</div>
<div class="row">
<div class="span8">
<dl>
<dt>Q: Who wrote Mosh?</dt>
<dd><p>Mosh was written by Keith Winstein, along with Anders Kaseorg, Quentin Smith, Richard Tibbetts, Keegan McAllister, and John Hood.</p></dd>
<dt>Q: Why another remote-terminal protocol?</dt>
<dd><p>Practical latency on the Internet is on the increase, with
the rise of bufferbloat and sophisticated wireless links
that optimize for throughput over delay. And roaming is more
common than ever, now that laptops and handheld devices have
largely displaced desktops. SSH is great, but frustrating to
use when you want to change IP addresses or have a
long-delay link or a dodgy connection.</p>
<p>Moreover, TELNET had some good things going for it — a
local-echo mode and a well-defined network virtual
terminal. Even today, SSH doesn't properly support UTF-8
end-to-end on a POSIX system.</p></dd>
<dt>Q: Are the mosh principles relevant to other network applications?</dt>
<dd><p>We think so. The design principles that Mosh stands for are
conservative: warning the user if the state being displayed
is out of date, serializing and checkpointing all
transactions so that if there are no warnings, the user
knows every prior transaction has succeeded, and handling expected events (like roaming from one
WiFi network to another) gracefully.</p>
<p>Those don't seem too controversial, but fancy apps like
Gmail-in-Chromium or on Android still behave atrociously on
dodgy connections or after switching IP addresses. (Have you
ever had Gmail leave an e-mail message in "Sending..." for ten
hours while merrily retrieving new mail and not indicating any
kind of error? Us too.) We think there may be considerable
room for improvement in many network user interfaces from the
application of these values.</p></dd>
<!--
<dt>Q: I'm using gnome-terminal or xfce4-terminal and seeing glitches in the last line of the terminal. Sometimes they go away when I select the text.</dt>
<dd><p>This is a bug in some versions of VTE, the terminal emulation library that powers gnome-terminal, xfce4-terminal, and some other terminal emulators. The VTE maintainers have fixed this bug; please see the below referenced bugzillas and other links. Another option is to switch to a non-VTE-based terminal, such as rxvt-unicode or xterm.</p>
<p>After installing a fixed package, for the fix to become effective,
please make sure to restart <b>all</b> instances of the terminal.</p>
<p>See also:</p>
<ul>
<li>Original (?): <a href="https://bugzilla.gnome.org/show_bug.cgi?id=542087"
>542087 - Graphical glitches after "change scroll region"</a></li>
<li>One of its duplicates: <a href="https://bugzilla.gnome.org/show_bug.cgi?id=686097"
>686097 - screen not redrawn correctly when using mosh</a></li>
<li>Fedora bugzilla, including a rebuild script:
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1080662#c1">RHBZ #1080662</a></li>
<li>vte upstream commit <a href="https://git.gnome.org/browse/vte/commit/?id=88e8e89560a62d0981ce2b18974a230d0a07dbdd"
>88e8e89 widget: Fix invalidation region</a></li>
</ul>
</dd>
-->
<dt>Q: I'm getting "mosh requires a UTF-8 locale." How can I fix this?</dt>
<dd><p>To diagnose the problem, run <code>locale</code> on the local
terminal, and <code>ssh <i>remotehost</i> locale</code>. To use Mosh,
both sides of the connection will need to show a UTF-8 locale, like
<code>LC_CTYPE="en_US.UTF-8"</code>.</p>
<p>On many systems, SSH will transfer the locale-related
environment variables, which are then inherited by
<code>mosh-server</code>. If this mechanism fails, Mosh (as of
version 1.2) will pass the variables itself. If neither
mechanism is successful, you can do something like</p>
<pre>mosh <i>remotehost</i> <b>--server="LANG=en_US.UTF-8 mosh-server"</b></pre>
<p>If <code>en_US.UTF-8</code> does not exist on the remote server,
you can replace this with a UTF-8 locale that does exist. You
may also need to set LANG locally for the benefit of
<code>mosh-client</code>. It is possible that the local and
remote machines will need different locale names. See also <a
href="https://github.com/keithw/mosh/issues/98">this GitHub
ticket</a>.</p></dd>
<dt>Q: What does the message "Nothing received from the server on UDP port 60003" mean?</dt>
<dd>
<p>This means that <code>mosh</code> was able to start
<code>mosh-server</code> successfully on the remote machine, but the client is
not able to communicate with the server. This generally means that
some type of firewall is
blocking the UDP packets between the client and the server. If you
had to forward TCP port 22 on a NAT for SSH, then you will have to
forward UDP ports as well. Mosh will use the first available
UDP port, starting at 60001 and stopping at 60999. If you are only
going to have a small handful of concurrent sessions on a server, then you can
forward a smaller range of ports (e.g., 60000 to 60010).
</p>
<p>
Tools like netstat, netcat, socat, and tcpdump can be useful for debugging
networking and firewall problems.
</p>
<p>This problem can also be the result of a bug in glibc 2.22 that
affects programs that link with protobuf and utempter and use
aggressive compiler hardening flags. (<a href="https://sourceware.org/bugzilla/show_bug.cgi?id=19861">glibc bugtracker entry</a>, as well as <a href="https://github.com/mobile-shell/mosh/issues/727">Mosh bugtracker entry</a>.) The
problem causes mosh-server to segfault immediately on startup. We
believe we have worked around this problem in Mosh 1.2.6, but please
report a bug if you find otherwise.</p>
</dd>
<dt>Q: Why do you insist on UTF-8 everywhere?</dt>
<dd><p>We're really not UTF-8 zealots. But it's a lot easier to
correctly implement <strong>one</strong> terminal emulator
than to try to do the right thing in a variety of difficult
edge cases. (This is what GNU screen tries to do, and in our
experience it leads to some very tricky-to-debug situations.)
So mosh just won't start up until the user has everything
configured for a UTF-8-clean pathway. It may be annoying, but
it also probably reduces frustration down the
road. (Unfortunately an 8-bit vt220 and a UTF-8 vt220 are
different and incompatible terminal types; the UTF-8 goes
in <strong>underneath</strong> the vt220 state machine.)</p></dd>
<dt>Q: How do I use a different SSH port (not 22)?</dt>
<dd><p>As of Mosh 1.2, you can pass arguments to <code>ssh</code> like so:</p>
<pre>mosh <i>remotehost</i> <b>--ssh="ssh -p 2222"</b></pre>
<p>Or configure a host alias in <code>~/.ssh/config</code> with a
<code>Port</code> directive. Mosh will respect that too.</p></dd>
<dt>Q: I'm getting 'mosh-server not found'.</dt>
<dd><p>Please make sure that mosh is installed on the client, and
mosh (or at least mosh-server) is installed on the server you
are trying to connect to. If you install mosh-server in your
home directory, please see the "Server binary outside path"
instructions in the Usage section, above.</p></dd>
<dt>Q: SSH authenticates using Kerberos tickets, but Mosh asks me for a password.</dt>
<dd><p>In some configurations, SSH canonicalizes the hostname
before passing it to the Kerberos GSSAPI plugin. This breaks
for Mosh, because the initial forward DNS lookup is done by
the Mosh wrapper script. To work around this, invoke Mosh as</p>
<pre>mosh <i>remotehost</i> <b>--ssh="ssh -o GSSAPITrustDns=no"</b></pre>
<p>This <a href="https://bugzilla.mindrot.org/show_bug.cgi?id=1008">will
often fail</a> on a round-robin DNS setup. In that case it is probably
best to pick a specific host from the round-robin pool.</p></dd>
<dt>Q: Why is my terminal's scrollback buffer incomplete?</dt>
<dd><p>Mosh 1.2 synchronizes only the visible state of the terminal. Mosh
1.3 will have complete scrollback support; see <a
href="https://github.com/keithw/mosh/issues/2">this issue</a> and the
others which are linked from there. For now, the workaround is to use
<a href="https://www.gnu.org/software/screen/">screen</a> or <a
href="https://github.com/tmux/tmux">tmux</a> on the remote side.</p></dd>
<dt>Q: How do I get 256 colors?</dt>
<dd><p>Make sure you are running mosh in a terminal that
advertises itself as 256-color capable. (This generally means
TERM will be xterm-256color or screen-256color-bce.)</p></dd>
<dt>Q: What is Mosh's security track record so far?</dt>
<dd><p>Mosh 1.0 was released in March 2012. As of the release of Mosh
1.2.6 in August 2016, as far as the developers are aware:
<ul>
<li>In the last four years, <b>no security vulnerabilities of
any kind</b> (major or minor) have been reported in Mosh.
<li>No major security vulnerabilities have <b>ever</b> been
reported in Mosh. We define major security vulnerabilities to
include privilege escalation, remote code execution,
denial-of-service by a third party, etc.
<li>Two denial-of-service issues were discovered and fixed in
releases in 2012. One issue allowed a mosh-server to cause the
mosh-client to spend excess CPU (CVE-2012-2385, fixed in Mosh
1.2.1, released May 2012). Another issue allowed the server
host to cause the mosh-client to send UDP datagrams to an
incorrect address, foiling its attempt to connect (fixed in
Mosh 1.2.2, released July 2012).
</ul></dd>
<dt>Q: How does Mosh's security compare with SSH's?</dt>
<dd><p>We think that Mosh's conservative design means that its attack
surface compares favorably with more-complicated systems like
OpenSSL and OpenSSH. Mosh's track record has so
far borne this out. Ultimately, however, only time will tell
when the first serious security vulnerability is discovered in
Mosh—either because it was there all along or because it
was added inadvertently in development. OpenSSH and OpenSSL have
had more vulnerabilities, but they have also been released
longer and are more prevalent.</p>
<p>In one concrete respect, the Mosh protocol is more secure than
SSH's: SSH relies on unauthenticated TCP to carry the contents
of the secure stream. That means that an attacker can end an SSH
connection with a single phony "RST" segment. By contrast, Mosh
applies its security at a different layer (authenticating every
datagram), so an attacker cannot end a Mosh session unless the
attacker can <b>continuously</b> prevent packets from reaching
the other side. A transient attacker can cause only a transient
user-visible outage; once the attacker goes away, Mosh will
resume the session.</p>
<p>However, in typical usage, Mosh relies on SSH to exchange keys
at the beginning of a session, so Mosh will inherit the
weaknesses of SSH—at least insofar as they affect the
brief SSH session that is used to set up a long-running Mosh
session.</p></dd>