GateOne 是一款基于 html5 实现的 ssh 客户端,有如下特点:

  • 不需要任何浏览器插件

  • 支持多用户和多终端,同时支持上百个用户和终端

  • 终端支持高级特性,例如 256 色彩,高级文本样式支持

  • 支持终端截图,保存为图片和 pdf 文件

  • 多语言支持

  • 支持复制和粘贴,快捷键支持

  • 终端会话持久化,关闭浏览器不会影响终端的运行

  • 支持服务器记录用户会话到 syslog

  • 支持嵌入到其他系统。

  • 支持多种用户验证方式。匿名,Kerberos,PAM,Google Auth...

  • 轻松定制化。支持插件形式的扩展,插件支持多语言,python,js,css

  • 用户连接时,可以关闭和启动服务器(用户的 ssh 会话保留)

  • ssh 插件支持复制会话,支持使用密钥登录

  • 系统支持 Python 2.6,Python 3,pypy

安装步骤:

一、环境说明

python 2.7.5

tornado 2.4

pip 2.7

setuptools 19.6

gateone 1.1

本机测试用的是虚拟机 centOS 环境中没有安装ifconfig , wget 。用yum命令安装了

首先要查看本机ip(最后访问的ip,以及origin配置需要用到) 进入/etc/sysconfig/network-scripts目录,查找ifcfg开头的文件,将配置ONBOOT=no,改为ONBOOT=yes


cd /etc/sysconfig/network-scripts

vi ifcfg-ens33
#将配置ONBOOT=no,改为ONBOOT=yes

service network restart

yum search ifconfig
yum install net-tools

查看本机IP 192.168.143.153

二、接下来开始安装GateOne相关的内容,我们把文件安装在/root/gateone目录下

cd /root
mkdir gateone
cd gateone

1、安装pip(对应2.7版本的python)

cd /root/gateone
yum install wget
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py

2、安装tornado

cd /root/gateone
wget https://pypi.python.org/packages/2d/9a/38e855094bd11cba89cd2a50a54c31019ef4a45785fe12be6aa9a7c633de/tornado-2.4.tar.gz#md5=c738af97c31dd70f41f6726cf0968941
tar zxvf tornado-2.4.tar.gz
cd tornado-2.4
python setup.py build
python setup.py install
python -c "import tornado; print(tornado.version)"

3、安装settools

    cd /root/gateone
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26
tar -zxvf setuptools-19.6.tar.gz
cd setuptools-19.6
python setup.py build
python setup.py install

4、安装Pillow

    cd /root/gateone
yum install python-devel
yum install zlib-devel
yum install libjpeg-turbo-devel
    
    pip install pillow

5、安装gateOne

a、下载安装

  cd /root/gateone
  wget https://github.com/downloads/liftoff/GateOne/gateone-1.1.tar.gz
  tar -zxvf gateone-1.1.tar.gz
  cd GateOne
  python setup.py install

b、运行gateone

cd /root/gateone/GateOne/gateone
./gateone.py
运行之后会产生很多配置文件,需要先关闭程序重新配置后重启
关闭都采用此方式,查询进程后关闭
ps -ef|grep gateone
kill -917785

c、修改配置文件

vi server.conf

此处我们修改了 port 端口为1443 (也可以不修改)

修改origins 新增本机ip的配置,修改完成后保存

d、重启(采用后台启动方式)

nohup python gateone.py &

6、防火墙开放端口

firewall-cmd --list-ports
firewall-cmd --zone=public--add-port=1443/tcp --permanent
firewall-cmd --reload

7、浏览器访问

访问地址是orgin中添加的 https://192.168.143.153:1443。ssh链接上之后,重新打开页面,会回到上次的页面

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐