wiki:dienste:mosh

Wie oft kommt es vor, dass man unterwegs ist und eine SSH-Verbindung zu einem Server benötigt.

Das mobile Internet ist nicht immer das stabilste und so kommt es öfters als gewollt zu Verbindungsabbrüchen.

Dies ist eine Anleitung, um mosh unter CentOS 7 zu installieren und die Firewall (firewalld) zu konfigurieren.

Mosh

Hier baut mosh eine Brücke vom altbewährten SSH zu einem verbindungslosen Protokoll wie UDP.

yum install mosh

In der Firewall müssen die für Port's 60000-61000 (Standard; änderbar) geöffnet werden

Um in der Firewall den Service „mosh“ auwählen zu können, muss ein Servicefile erstellt werden.

/etc/firewalld/service/mosh.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>mobile shell with roaming and intelligent local echo</short>
  <description>mosh  (mobile  shell) is a remote terminal application that supports intermittent connectivity, allows roaming, and provides speculative local echo and line editing of user keystrokes.</description>
  <port protocol="udp" port="60000-61000"/>
</service>

Firewall öffnen

firewall-cmd --add-service=mosh --permanent --zone=public
firewall-cmd --reload

Auf dem Server muss kein Dienst laufen. mosh wird „on-the-fly“ gestartet.

Verbindungsaufbau:

  • mosh (Client) baut eine SSH-Verbindung (Server) auf (authentifizierung und login)
  • Es wird geprüft, ob mosh(-server) installiert ist
  • Ist mosh(-server) installiert, wird über UDP Port 60000 - 61000 eine Verbindung aufgebaut (Protokoll SSP: State Synchronization Protocol)
  • Verschlüsselung

Wo Licht ist, ist auch Schatten

mosh unterstützt nicht (laut man-Page:

  • X Forwarding
  • non-interactive use of SSH
  • Port-Forwarding
  • sshfs
Geben Sie Ihren Kommentar ein. Wiki-Syntax ist zugelassen:
   _  __   ___    ___  ______  ____ 
  | |/_/  / _ )  / _ \/_  __/ / __ \
 _>  <   / _  | / ___/ / /   / /_/ /
/_/|_|  /____/ /_/    /_/    \___\_\
 
  • wiki/dienste/mosh.txt
  • Zuletzt geändert: 2020/03/25 11:21
  • von wikiadmin