Mosh: Difference between revisions

imported>Nix
m add Software/Applications subcategory
imported>Exyi
Add general info about mosh usage and instalation
Line 1: Line 1:
{{expansion|Missing installation and configuration of both server and client.}}
[https://mosh.org/ Mosh] is an alternative SSH terminal. It has support for roaming, local echo and uses UDP for transport. It also aims to improve responsiveness on intermittent, and high latency connections.
 
See the [https://search.nixos.org/packages?show=mosh&query=mosh mosh Package] and [https://search.nixos.org/options?query=programs.mosh mosh Options]
 
== Instalation ==
 
=== Client ===
 
Install the <code>[https://search.nixos.org/packages?show=mosh&query=mosh mosh]</code> package.
 
=== Server ===
 
Enable the <code>[https://search.nixos.org/options?query=programs.mosh programs.mosh]</code> module. You can simply add the following into your <code>/etc/nixos/configuration.nix</code>:
 
<syntaxhighlight lang=nix>
# Enable mosh, the ssh alternative when client has bad connection
# Opens UDP ports 60000 ... 61000
programs.mosh.enable = true;
</syntaxhighlight>
 
== Usage ==
 
With mosh installed on both the client and server, connect by running:
 
<syntaxhighlight lang=console>
$ mosh user@server
</syntaxhighlight>
 
Note that mosh uses SSH for authentication and initialization, so it will respect aliases and other options in <code>.ssh/config</code>. You can also specify SSH options using the <code>--ssh</code> argument. For example, to use port 1122 instead of 22, you can either use <code>Port 1122</code> in SSH config, or use mosh with the <code>--ssh</code> argument:
 
<syntaxhighlight lang=console>
$ mosh --ssh='ssh -p 1122' user@server
</syntaxhighlight>
 
More information is available at [https://mosh.org/#usage mosh.org] or using <code>[https://manpages.debian.org/bullseye/mosh/mosh.1.en.html man mosh]</code>


== Troubleshooting ==
== Troubleshooting ==