Ajaxterm 是一款基於 Web 的 SSH 客戶端軟體,以 Python 撰寫,因而能在多種 Linux 發行版上運行,安裝也十分簡單。下圖為 Linode 透過 Ajaxterm 進行 Console Access 的畫面。

wget https://antony.lesuisse.org/software/ajaxterm/files/Ajaxterm-0.10.tar.gz
tar zxvf Ajaxterm-0.10.tar.gz cd Ajaxterm-0.10 ./configure --prefix=/usr make && make install
Ajaxterm 需要運行於 Python 2.5 以上環境,若系統 Python 版本過低,登入時會出現「Login incorrect」錯誤,此時需安裝新版本 Python:
rpm -Uvh https://yum.chrislea.com/centos/5/i386/chl-release-5-3.noarch.rpm rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CHL rpm -Uvh https://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm yum install libffi yum install python26
同時需修改 /etc/init.d/ajaxterm,在註解後加入 DAEMON=/usr/bin/python2.6(依實際安裝版本而定),並確認 ajaxterm=/usr/local/share/ajaxterm/ajaxterm.py 路徑正確。
/etc/init.d/ajaxterm --help
Usage: ajaxterm {start|stop|restart|condrestart}Ajaxterm 預設使用 8022 埠,而防火牆通常僅放行 80、443 等常用埠,此時可透過 Web 伺服器反向代理,以 80 埠訪問 Ajaxterm。官方提供 Apache 的配置方法,若使用 Nginx,可加入以下 server 段:
server {
listen 80;
server_name ssh.linuxeye.com;
location / {
proxy_pass https://127.0.0.1:8022;
}
}重新載入 Nginx 設定後,即可透過 ssh.linuxeye.com 訪問你的 Linux 主機。