ubuntu 使用 gateone 实现web terminal ssh连接 / 网页版ssh终端模拟器
类似于一个web putty,即通过浏览器实现ssh远程访问功能
基于 HTML5 技术,无需任何浏览器插件。
下载地址:https://github.com/liftoff/GateOne/downloads
附件 liftoff-GateOne-v1.0-13-gdcc037f
- 安装
apt-get purge python-tornado
apt-get install python-pip dtach
pip install tornado pyopenssl
wget https://nodeload.github.com/liftoff/GateOne/zipball/master
mv master master.zip
unzip master.zip
cd liftoff-GateOne-dcc037f/
python setup.py install
- 运行
cd /opt/gateone
./gateone.py
第一次运行会生成配置文件,可在运行后自行修改。
/opt/gateone/server.conf
sso_service = "HTTP"
locale = "en_US"
https_redirect = False
pam_service = "login"
syslog_facility = "daemon"
disable_ssl = False
session_logging = True
syslog_host = None
cookie_secret = "*"
syslog_session_logging = False
address = ""
auth = None
port = xxx //修改端口
uid = "0"
url_prefix = "/"
user_dir = "/opt/gateone/users"
log_file_num_backups = 10
logging = "info"
dtach = True
certificate = "certificate.pem"
log_file_max_size = 104857600
command = "/opt/gateone/plugins/ssh/scripts/ssh_connect.py -S '/tmp/gateone/%SESSION%/%SHORT_SOCKET%' –sshfp -a '-oUserKnownHostsFile=%USERDIR%/%USER%/ssh/known_ho
sts'"
session_dir = "/tmp/gateone"
log_to_stderr = False
debug = False
session_timeout = "5d"
origins = "https://xxx.xxx:你的端口号" //修改访问的网址
gid = "0"
sso_realm = None
embedded = False
keyfile = "keyfile.pem"
pid_file = "/var/run/gateone.pid"
js_init = ""
log_file_prefix = "/opt/gateone/logs/webserver.log"
pam_realm = "xdty"
类似于上面的文件,可自行修改port(端口号)origins 允许运行gateone的网址
通过ctrl+c结束进程或者通过killall python结束后台进程。重新配置service.conf后运行./gateone.py即可
转载请注明出处 http://www.xdty.org/687
Tags: gateone putty ssh ubuntu web terminal
评论:1