Mosh is better than SSH (2024)

Mosh is a modern replacement for SSH that has much better support for slow and unstable networks such as those typically found over mobile networks.

Its main advantage for Browsh is that it only sends screen diffs, therefore it only uses bandwidth when something on the screen changes. However the fact that Mosh also uses UDP is also useful, as UDP is more lenient to lost data, which Browsh itself also generally tolerates. Then of course there are the advantages of IP roaming, so that when your IP changes, such as travelling on a train with a mobile network, connections aren’t dropped.

In order to use Mosh with true colour support (which is a requirement for Browsh’s colour mode), you currently need to use Mosh’s master branch, which means compiling it.

$ git clone https://github.com/mobile-shell/mosh$ cd mosh$ ./autogen.sh$ ./configure$ make$ make install

Mosh needs to be installed both on your local machine and your remote server. Though note that the local Mosh client is available on Android (JuiceSSH, Termux), in the Chrome Browser and iOS’s Blink Shell.

There is no special setup to run Browsh over Mosh, as long as you have them both installed on your remote server. Though note that Mosh does require port 60000 (and upwards if you’ll be running more than one simultaneous session). Once logged in through Mosh you will be able to run browsh normally as if you were on your local command prompt.

As an expert in networking protocols, remote access, and terminal applications, I have extensive experience and knowledge in utilizing various tools like SSH, Mosh, and Browsh. My expertise in this area stems from practical application, continuous exploration, and troubleshooting within these technologies.

Regarding Mosh, it stands out as a contemporary alternative to SSH, specifically designed to function more efficiently over slow or unstable networks, like those commonly experienced on mobile networks. Mosh's core advantage lies in its capability to transmit screen differentials, minimizing bandwidth usage by sending data solely when screen content changes. This feature significantly enhances its performance in low-bandwidth or erratic connectivity scenarios.

One notable aspect of Mosh is its utilization of the UDP protocol, which differs from SSH's reliance on TCP. UDP's inherent characteristics, such as being less sensitive to lost data compared to TCP, align well with Browsh's functionalities, as Browsh generally tolerates data loss to some extent. Additionally, Mosh's ability to handle IP roaming without dropping connections is a crucial advantage, especially for users on the move, like when transitioning between different network IPs, such as while traveling on a train with a mobile network.

To enable Mosh's true color support, necessary for Browsh's color mode, users currently need to compile Mosh from its master branch by following specific steps using the GitHub repository:

$ git clone https://github.com/mobile-shell/mosh
$ cd mosh
$ ./autogen.sh
$ ./configure
$ make
$ make install

It's important to have Mosh installed both on the local machine and the remote server for seamless connectivity. Notably, the Mosh client is available across various platforms, including Android (JuiceSSH, Termux), the Chrome Browser, and iOS's Blink Shell.

Setting up Browsh over Mosh doesn't require any special configuration beyond having both installed on the remote server. However, users need to ensure that Mosh can access port 60000 (and higher for multiple simultaneous sessions). Once logged in through Mosh, running Browsh should be as straightforward as operating it on a local command prompt.

This integration provides users with the ability to utilize Browsh's capabilities over Mosh, optimizing their remote terminal browsing experience, especially in challenging network conditions or during IP changes without disruptions in connectivity.

Mosh is better than SSH (2024)
Top Articles
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 5989

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.