對於網絡開發者、管理員來說,Putty、XShell、SecureCRT這些工具我們用的都比較多,不過本文的主角不是它們, 推薦一款神器——MobaXterm, 遇到它才體會到什麼叫相見恨晚。
羅列MobaXterm主要的一些功能點:
一、支持多種類型的會話, 集大成!!!, 尤其是支持mosh, 對應網絡不穩定的遠程服務器訪問有非常大的幫助。
二、 我們在windows平臺可以使用海量的linux應用(exe文件)
MobaXterm集成了cygwin,諸多linux應用可以移植到windows上面。
例如我安裝了一個包 gnuplot,其實其對應一條安裝命令: apt-cyg install gnuplot
三、 自帶Xserver
本地機器採用 MobaXterm (自帶 X server) 連接遠程服務器。然後,在服務器上運行 GUI 程序 (即 X client),通過 SSH X11 Forwarding,轉發到本地 (Windows 機器上)。
不理解?沒關係? 實操一遍看效果!
1. 服務器安裝 X11 Forwarding相關軟件, 假定是centos系統
<code>sudo yum install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-font-utils xorg-x11-fonts-Type1 xclock/<code>
然後啟用X11 Forwarding(X11Forwarding,X11UseLocalhost這兩項 )
<code>sudo vim /etc/ssh/sshd_config #AllowAgentForwarding yes#AllowTcpForwarding yes#GatewayPorts no X11Forwarding yes #X11DisplayOffset 10 X11UseLocalhost no/<code>
重啟 sshd服務
<code>sudo systemctl restart sshd.service/<code>
2. 本地端(windows已安裝MobaXterm)
step1: 配置ssh會話,開啟 X11-Forwarding
step2: 啟動 X-server(灰色:停止; 彩色: 啟動)
step3. ssh連接服務器,等待成功
step4. 執行程序 xclock (上面操作中有再服務器中安裝了該程序), 則我們可以在windows端看到該程序的UI界面(本來它顯示在服務器上的)
閱讀更多 老羅筆記 的文章