以前搞得是guacamole,這個能夠web界面管理RDP VNC SSH協議,很是好用,可是過程相對複雜,我用的是這個,可是我不推薦大家用。css
技術能夠的話能夠試一下搭建。若是下面執行有問題,參考最下方的連接,能夠解決html
下面就講一下python
這個相對很是的簡單,可是隻能用ssh協議,對於一個運維人員來說來講,這個挺好用的。git
雖說有很多方便實用的SSH客戶端,好比Windows下的Putty、Xshell,安卓上的JuiceSSH,但有時候我想在其餘電腦上使用SSH又不想下載安裝這些軟件時就想要一個網頁版的SSH工具。今天終於想到這件事,搜了一下發現還真有,就是這個GateOne,不過這個須要用到Python,下面就說說我安裝配置的過程。github
首先建議更源爲阿里源。web
root@ubuntu:~/GateOne# vim /etc/apt/source.list 打開這個文件,直接將如下的源複製進去,原來的刪除掉。shell
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restrictedubuntu
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-propertiesvim
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted瀏覽器
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
保存後:
更新:
1
|
sudo apt-
get
update
|
個人系統是Ubuntu16.04,首先要安裝Python,Python2或者3均可以。其次就要安裝一些依賴文件:
apt-get install python python-pip python-imaging pip install pyopenssl ordereddict tornado==2.4.1
等待安裝完成便可。若是缺乏一些依賴文件,GateOne在運行時會提示錯誤的,親測
GateOne項目的源碼在GateOne,下載地址:gateone-1.1.tar.gz,具體的命令:
wget https://github.com/downloads/liftoff/GateOne/gateone-1.1.tar.gz tar -xzvf gateone-1.1.tar.gz cd gateone-1.1
也能夠用git clone 命令來下載:
git clone https://github.com/liftoff/GateOne.git cd GateOne
若是沒有wget 或者 git 命令,先用 apt-get install git wget 來下載wget 和 git
而後就是安裝了,進入到GateOne目錄裏,輸入命令:
python setup.py install
等待完成便可。
安裝完成以後先運行一下GateOne:
gateone
或者
service gateone start
這時它會自動生成配置文件,按住 ctrl + C 或者 輸入命令
service gateone stop //若是你是用 service gateone start 啓動的
中止gateone。它的配置文件通常在 /etc/gateone/conf.d/10server.conf,用一個編輯器打開它,是這樣的:
若是以上的重啓命令什麼的出現錯誤,先不用理會。直接 vim /etc/gateone/conf.d/10server.conf 打開編譯這個文件,
// This is Gate One's main settings file. { // "gateone" server-wide settings fall under "*" "*": { "gateone": { // These settings apply to all of Gate One "address": "", "ca_certs": null, "cache_dir": "/tmp/gateone_cache", "certificate": "certificate.pem", "combine_css": "", "combine_css_container": "#gateone", "combine_js": "", "cookie_secret": "Yjg3YmUzOGUxM2Q2NDg3YWI1MTI1YTU3MzVmZTI3YmUzZ", "debug": false, "disable_ssl": false, "embedded": false, "enable_unix_socket": false, "gid": "0", "https_redirect": false, "js_init": "", "keyfile": "keyfile.pem", "locale": "en_US", "log_file_max_size": 100000000, "log_file_num_backups": 10, "log_file_prefix": "/opt/gateone/logs/webserver.log", "log_to_stderr": null, "logging": "info", "origins": [ "localhost", "127.0.0.1", "enterprise", "enterprise.example.com", "10.1.1.100"], "pid_file": "/tmp/gateone.pid", "port": 443, "session_dir": "/tmp/gateone", "session_timeout": "5d", "syslog_facility": "daemon", "syslog_host": null, "uid": "0", "unix_socket_path": "/tmp/gateone.sock", "url_prefix": "/", "user_dir": "/opt/gateone/users", "user_logs_max_age": "30d" } } }
這裏能夠看看GateOne的文檔,若是你不用https,就要把
"disable_ssl": false, 這一行中的false 改成 true
若是想要把它嵌入到網站之中,就把
"embedded": false, //改成true
至於如何嵌入到網站,隨後有時間了再搞,我會再更新的。
還有最重要的端口設置
"port": 443, // 默認是443,若是不用https 就改爲其餘的端口
至於這個:
"origins": [ "localhost", "127.0.0.1", "enterprise", "enterprise.example.com", "10.1.1.100"],
在這裏面添加域名或者IP,例如上面的端口填的是111,域名添加了sunriseydy.top,就能夠在瀏覽器中訪問:sunriseydy.top:111 來使用GateOne。
相關鏈接:http://www.laozuo.org/10703.html
https://www.jianshu.com/p/2f66f7242788