利用 Mosh 改善 SSH

本文编写于2903天前,最后编辑于 2903天前,部分内容可能已经过时,请您自行斟酌确认。

在高延迟的网络下,Mosh 比 SSH 流畅多了,而且3G网络下,丢失网络变更IP后,终端连接不会中断。

安装

brew install mobile-shell

注: Server, Client 都需要安裝 mosh 才可以。
服务器端

apt-get install mosh
yum install mosh

用法

经典用法

Mosh will log the user in via SSH, then start a connection on a UDP port between 60000 and 61000.

$ mosh chewbacca.norad.mil

Different username

$ mosh potus@ackbar.bls.gov

Server binary outside path

$ mosh --server=/tmp/mosh-server r2d2

Selecting Mosh UDP port

$ mosh -p 1234 darth

Selecting SSH port

$ mosh --ssh="ssh -p 2222" figrindan

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注