一、安装moshhtml
yum install epel-release
yum install mosh
二、使用客户端链接git
mosh user@ip -p 60001
三、查看mosh的链接(默认UDP 60001端口,防火墙需放行)github
netstat -unlp | grep mosh
一、启动mosh-server服务端redis
mosh-server new -c 256 -s -l LANG=en_US.UTF-8 -p 60000
显示以下:浏览器
MOSH CONNECT 60000 3aaxFsHQzzL6pb35pDzC+Q mosh-server (mosh 1.3.0) [build mosh 1.3.0] Copyright 2012 Keith Winstein <mosh-devel@mit.edu> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
二、使用生成的key经过mosh-client链接bash
MOSH_KEY=9S9Bz/KDYVMNyiJg2267nw mosh-client ip 60000
备注:若是提示字符集问题,请在~/.bashrc中添加工具
export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8
最后,推荐一个经过浏览器直接访问终端的工具gotty(https://github.com/yudai/gotty)ui