Mosh:mit launched a good SSH replacement-github.com

Source: Internet
Author: User



Mosh Full name Mobile Shell, a remote terminal program introduced by MIT to replace SSH, is available for Gnu/linux, FreeBSD, Solaris, Mac OS X, and Android. It supports intermittent connections, allows roaming, provides local echo, and line editing for user input.

It is designed to provide typical SSH interaction, in addition to:

    • Mosh maintains session state if the client sleeps and then wakes up or temporarily breaks the network.

    • Mosh allows the client or server to "roam" and change the IP address while remaining connected. Unlike SSH, switching between Wi-Fi networks, or switching from Wi-Fi to cellular data or wired connections, mosh can remain connected.

    • Mosh runs a server predictive model in the background and is able to intelligently guess how each keystroke affects the display of the screen. When the forecast reaches the confidence interval, it is displayed in advance while waiting for the acknowledgement to be sent back from the server. Most of the time, the left and right arrow keys can be echoed early.

Therefore, the mosh can be used in a large delay connection. such as cellular data or poor quality Wi-Fi. Unlike other protocols in the local ECHO model, Mosh can work well with full-screen programs, such as Emacs, VI, Alpine, and Irssi, and automatically fix it from occasional predictive errors. In a high-latency connection, the mosh is underlined with an underscore, and when confirmation is received from the service, the underline is removed.

Mosh does not support X-forwarding or non-interactive SSH applications, including port forwarding.

Other Features:

    • Mosh adjusts the frame rate to avoid filling the send queue in slow connections, so "control-c" is often used to stop a suspended animation process.

    • Mosh will alert the user for a period of time when the server is not received accordingly.

    • Mosh supports lossy networks with packet loss partitioning flags.

    • Mosh is better than ssh when dealing with Unicode boundaries, and has a terminal emulator on its own, but requires a UTF-8 environment to run.

    • Mosh uses SSH to complete the connection and user authentication, which itself does not contain high-privilege code.

Get Mosh
Mosh's home page has methods for how to install it on various platforms, as well as how to compile the installation from source code.
It is important to note that the Mosh client receives an AES session key as an environment variable. If you provide an interface for other operating systems, make sure that the environment variables for an executing process are not read by other users. We confirm that this will happen in Gnu/linux,os X and FreeBSD.

Use
Mosh-client must exist on the user machine, Mosh-serve installed on the remote host.
User execution

$ mosh [[email Protected]]host

If Mosh-client or Mosh-serve are not in the user path, mosh can specify the location through--client=path and--server=path. More options can be found in the mosh (1) User manual.
There are many more examples and FAQs on the mosh homepage.

How it works
Mosh through SSH to [email protected] to confirm the connection, SSH will prompt the user to enter a password, or use the public key to log in.
As a starting point, the Mosh-server runs on the server, the service process listens on a UDP port and sends its port number and a AES-128 key back to the client via SSH, the SSH connection is then closed, and the next Terminal session is UDP.

If the client changes the IP address, the server will send the new data to the new IP address within a few seconds.

For functional implementations, the mosh requires UDP datagrams to be transferred between the server and the client, with the default port number between 60000 and 61000, which the user can also specify with the-P option.

Suggestions
Compile flag: Mosh is a security-sensitive code that we recommend to add--enable-compile-warnings=error to./configure when it is automatically compiled into a binary package. When using g++ or clang++ compile in gnu/linux, it should be explicitly added-werror, if it does not exist, please notify us.

Where possible, Mosh is built with a variety of binary hardening flags, such as-fstack-protector-all,-d_fortify_source=2, which provides proactive security to avoid memory contamination in mosh or the libraries it references. If you want to get a complete list of flags, search for Harden in Configure.ac. The Configure script can detect which flags your compiler supports and then turn it on automatically. If you want to disable this feature, pass the parameter--disable-hardening to./configure. If there is a problem with the default configuration, please notify us and we want as many users as possible to get the most secure configuration.

Mosh compile when the default optimization level of-O2, some users asked whether can be changed to-os, we have used Src/examples/benchmark to test it, the results show that gnu/linux g++ 4.6 environment,-o2 faster than-os 40%, in Mac Os X in the clang++ 3.1 environment,-o2 16% faster. Therefore, although the-os compiled program small, but Mosh CPU utilization is not particularly high, the user did not enter the time even hangs, we think-o2 is a better choice.

For more information
Mosh Home
http://mosh.mit.edu/
[Email protected] mailing list
Http://mailman.mit.edu/mailman/listinfo/mosh-devel
[Email protected] mailing list
Http://mailman.mit.edu/mailman/listinfo/mosh-users
The channel on freenode IRC.
Http://webchat.freenode.net/?channels=mosh

Read the original?



Mosh:mit launched a good SSH replacement-github.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.