Linux系統下Wetty安裝和使用說明

來源:互聯網
上載者:User

Linux系統下Wetty安裝和使用說明

1. Wetty簡介
Wetty是使用Node.js和websockets開發的一個開源Web-based SSH。關於Web-based SSH的更多資料請參考https://en.wikipedia.org/wiki/Web-based_SSH。

而wetty的資料請參考https://github.com/krishnasrinivas/wetty。

2. 環境準備
因為wetty是使用Node.js編寫的,所以我們要事先安裝好相關的Node.js環境。請看考這篇博文  。

3. Wetty安裝
運行下面命令進行安裝,

 $ git clone https://github.com/krishnasrinivas/wetty
 $ cd wetty
 $ sudo npm install

安裝過程可能會出錯,請參考下面的可能問題處理。

4. 驗證
安裝完成之後,然後運行下面命令啟動wetty服務,監聽3000連接埠號碼,

$ node app.js -p 3000

然後開啟瀏覽器,輸入http://127.0.0.1:3000,然後輸入密碼登陸成功後便可以進行命令列操作了,效果如所示,

5. 可能問題處理
5.1安裝時報error: 'Use' is not a member of 'node::Buffer'
因為我安裝的Node是4.1.1版本的,太新了。而wetty原本依賴的pty.js太老,導致編譯出現的問題。修改以下wetty原始碼目錄下的package.json,將依賴的pty.js修改成最新版本0.3.0(原本是^0.2.7-1)。儲存檔案,然後重新運行sudo npm install命令即可。

5.2 ssh訪問失敗
啟動wetty服務後,在瀏覽器中輸入http://127.0.0.1:3000時報一個類似於下面的”ssh: connect to host localhost port 22: Connection refused”的錯誤。

運行以下下面的命令重新安裝openssl-client和openssl-server即可,

$ sudo apt-get remove openssh-client openssh-server
$ sudo apt-get installopenssh-client openssh-server

(done)

本文永久更新連結地址:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.