一、安装依赖工具html
yum install git openssl-devel pam-devel zlib-devel autoconf automake libtool
二、克隆代码python
git clone https://github.com/shellinabox/shellinabox.git && cd shellinabox
三、生成configure
git
autoreconf -i
四、编译安装github
./configure --prefix=/opt/shellinabox make install echo $?
五、启动web
cd bin/ ./shellinabox -t
六、检查端口是否启动shell
netstat -ntplu Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:4200 0.0.0.0:* LISTEN 12131/./shellinabox
2、shellinabox web登录截图bash
一、web登录ssh
二、堡垒机tcp
三、192.168.16.51执行df和pwd命令工具
五、192.168.16.51执行top命令
一、views
@login_required def webssh(request): return render(request,'web_ssh.html')
二、web_ssh.html
{% extends 'index.html' %} {% block page-title %}WEB SSH{% endblock %} {% block page-content %} <div class="panel"> <div class="panel-heading"> <h3 class="panel-title">webssh</h3> </div> <div class="panel-body"> <ul> <a class="btn-link" href="http://192.168.16.52:4200/">web ssh </a> </ul> </div> </div> {% endblock %}
一、后台登录
二、链接具webssh