mosh——Linux下基於UDP的SSH連接工具


一:TCP over UDP

1、安裝mosh

yum install epel-release
yum
install mosh

 

2、使用客戶端連接

mosh user@ip -p 60001

 

3、查看mosh的連接(默認UDP 60001端口,防火牆需放行)

netstat -unlp | grep mosh

 

二:純UDP連接

1、啟動mosh-server服務端

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.

 

2、使用生成的key通過mosh-client連接

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM