Mosh (software)

from Wikipedia, the free encyclopedia
Mosh demo screenshot.png

Mosh (mobile shell) is a computer program which is used to make a remote command line available locally . Mosh is similar to SSH , but has additional functionalities to improve its use for mobile users. The main functions are:

  • Mosh maintains the connection even if the user " roams " and receives a different IP address , for example if the user of one WLAN changes to another WLAN or changes from WLAN to UMTS .
  • Mosh keeps the connection open if a user loses the internet connection or puts the client into a "sleep mode". SSH can lose its connection because TCP discards packets if the sender does not receive an acknowledgment after a certain period of time (timeout); In this case, the terminal session and any programs running in it are ended, unless they have been safeguarded by special precautions, such as the use of a screen .
  • Mosh tries to immediately show the user which keys they typed and which letters and words they deleted to compensate for the latency .

The main disadvantages of Mosh are that it places additional demands on the server and certain additional functions of SSH cannot be used.

Supported Platforms

Mosh is available for most Linux distributions , macOS , FreeBSD and OpenBSD , Android , Solaris and Cygwin . For iOS, the iSSH application provided an independent implementation of Mosh until 2015. There is now a successor with Blink. Mosh supports IPv6 from version 1.2.5.

disadvantage

Requirements for the server

The main disadvantage of Mosh is that it places additional demands on a server compared to ssh because it requires full UDP access to the server due to its design . Mosh cannot be used on servers that do not meet this requirement. Examples of this are systems behind firewalls that only release the ssh port via TCP. Servers that can only be reached indirectly are also problematic. While you can solve this with ssh with the option “ProxyCommand”, this is not supported by Mosh.

One port per connection

By default, the Mosh server tries to use the first free UDP port from the range 60000–61000 for each connection. This dynamic port usage is seen as a security-relevant disadvantage with regard to a clean firewall configuration. Firewalls usually try to track connections (so-called stateful filtering ), which is based on SYN / ACK flags in TCP, but UDP packets do not have such flags.
Workarounds:

  1. The UDP port can be set for each connection, so that it is sufficient to release a small number of ports.
  2. Deep packet inspection firewalls and application firewalls can be used to analyze the content of the data traffic.
Terminal scrollback and output drops

Scrollback is not yet supported - if a terminal emulator with scrollbars is used, then these are hidden. This function is planned for release 1.3. A workaround is currently that Mosh is used in conjunction with Screen or tmux , which have their own scrollback functionality.

SSH agent forwarding

SSH agent forwarding is not yet supported.

X11 forwarding

X11 forwarding is not yet supported.

Individual evidence

  1. http://mosh.mit.edu/
  2. https://www.linux.com/learn/tutorials/562553-into-the-mosh-pit-a-mobile-shell-replacement-for-ssh
  3. http://www.techopedia.com/2/28746/tech-support/linux/mosh-secure-shell-without-the-pain
  4. Archived copy ( memento of the original from October 18, 2012 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. @1@ 2Template: Webachiv / IABot / www.networkworld.com
  5. http://www.linux-magazine.com/Issues/2012/144/Mosh-and-AutoSSH
  6. http://mosh.mit.edu/
  7. Archived copy ( memento of the original from September 18, 2012 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. @1@ 2Template: Webachiv / IABot / www.zinger-soft.com
  8. http://www.blink.sh
  9. https://github.com/keithw/mosh/issues/81
  10. "'Mosh will log the user in via SSH, then start a connection on a UDP port between 60000 and 61000.'" , Retrieved on June 19, 2014.
  11. "Mosh bug report # 285: Can't use a ProxyCommand-based SSH connection" , Retrieved on June 18, 2014
  12. ^ "Dangers of opening up a wide range of ports? (Mosh)" , IT Security (Stack Exchange) , April 13, 2012. Retrieved on March 28, 2013.
  13. Multiplexing more sessions into the same UDP port
  14. "use -p to define remote UDP port"
  15. https://github.com/keithw/mosh/issues/2 "Scrollback support is planned for version 1.3"
  16. "Scrollback and alternate screen (was: Use alternate screen on smcup / rmcup)"
  17. "SSH Agent Forwarding"
  18. "Support X forwarding"