1. Gate One簡介
前面有兩個隨筆介紹過開源軟件tty.js和wetty在Linux的安裝。Tty.js和wetty都是采用Node.js實現的開源Web-based ssh。今天來介紹另一個開源Web-based ssh在Linux下的安裝:Gate One。
Gate One在后台進程是使用Python實現的,其前端則是JaveScript+WebSockets。關於Gate One的介紹、源碼和文檔請參考下面的鏈接。
Gate One主頁:http://liftoffsoftware.com/Products/GateOne
Gate One源碼:https://github.com/liftoff/GateOne
Gate One文檔:http://liftoff.github.io/GateOne/
2. Gate One安裝
Gate One要求系統必須滿足下面兩個前提條件,
(1)python: 2.6+ or 3.2+
(2)Tornado Framework 2.2+
2.1系統環境准備
在命令行終端中輸入命令
$ python -V
查看你本機是否安裝了python,如果先安裝python。
然后安裝pip,
$ wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py $ sudo python get-pip.py
安裝tornado,
$ sudo pip install tornado
安裝完成之后,我們來驗證一下我們的環境,
$ python -V $ python -c "import tornado; print(tornado.version)"
2.2 Gate One獲取和安裝
如果本地沒有安裝git,則先安裝git,
$ sudo apt-get install git
獲取Gate One源碼並進行安裝,
$ git clone https://github.com/liftoff/GateOne.git $ cd GateOne $ sudo python ./setup.py install
3. Gate One驗證
Gate One的配置文件是/etc/gateone/conf.d/10server.conf,我們采用默認的配置來驗證即可。運行下面命令啟動Gate One服務進程,
$ sudo gateone
啟動后,通過打印的信息,我們看到Gate One服務監聽了443端口號,然后在瀏覽器中輸入https://127.0.0.1:443/即可打開gateone的網頁。
然后點擊中間的Terminal圖標登陸某台機器,
(done)