一、安裝依賴工具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