一键式部署web-shell工具

webshell

基于web-ui的网络ssh终端,当前提供两种安装部署方式,基于ubuntu和docker容器;github连接

1. ubuntu安装过程

i.安装pip

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

ii.安装tornado、Pillow

pip install 'tornado==2.4.1'
pip install Pillow

iii.下载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

iv.修改GateOne配置远程管理

vi /opt/gateone/server.conf
dtach = False
origins = "http://localhost;https://localhost;http://127.0.0.1;https://127.0.0.1;https://47.94.11.195:4200"
session_timeout = "20m"

v.运行GateOne

cd /opt/gateone
nohup ./gateone.py &

vi.访问测试

https://192.168.0.111:443

2. 基于docker容器

i.本地docker构建镜像&启动

Dockerfile原文
FROM ubuntu:xenial
MAINTAINER lixiangyun "linimbus@126.com"

RUN apt-get update 
RUN apt-get -q install -y curl python wget vim ssh

# install pip tools
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python get-pip.py

# install tornado & pillow
RUN pip install 'tornado==2.4.1'
RUN pip install Pillow

# install gateone
WORKDIR /opt
RUN wget https://github.com/downloads/liftoff/GateOne/gateone-1.1.tar.gz
RUN tar -zxvf gateone-1.1.tar.gz

WORKDIR /opt/GateOne
RUN python setup.py install

EXPOSE 443

# run webshell gateone server
WORKDIR /opt/gateone
ENV IP_ORIGINS 127.0.0.1
CMD python /opt/gateone/gateone.py --origins=https://$IP_ORIGINS
构建和运行参考
docker build -t webshell .
docker run -d --net=host --restart=always -e IP_ORIGINS=192.168.0.111 webshell

ii.默认dockerhub下载镜像&启动

docker run -d --net=host --restart=always -e IP_ORIGINS=192.168.0.111 linimbus/webshell

使用浏览器打开

https://192.168.0.111:443

iii. 绑定域名方式

docker run -d --net=host --restart=always -e IP_ORIGINS=you.domain.com linimbus/webshell

使用浏览器打开

https://you.domain.com:443
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

linimbus

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值