yum install git openssl-devel pam-devel zlib-devel autoconf automake libtool
git clone https://github.com/shellinabox/shellinabox.git && cd shellinabox
unzip shellinabox-master.zip
cd shellinabox-master
autoreconf -i
./configure
./configure --prefix=/usr/local/shellinabox #設置項目存放位置
make && make install
[root@redhat2 bin]# cd /usr/local/shellinabox/bin [root@redhat2 bin]# ./shellinaboxd -t #默認是開啓在4200端口 -b #後臺啓動 -p #設置端口
-b, --background[=PIDFILE] run in background -c, --cert=CERTDIR set certificate dir (default: $PWD) --cert-fd=FD set certificate file from fd --css=FILE attach contents to CSS style sheet --cgi[=PORTMIN-PORTMAX] run as CGI -d, --debug enable debug mode -f, --static-file=URL:FILE serve static file from URL path -g, --group=GID switch to this group (default: nobody) -h, --help print this message --linkify=[none|normal|aggressive] default is "normal" --localhost-only only listen on 127.0.0.1 --no-beep suppress all audio output -n, --numeric do not resolve hostnames -m, --messages-origin=ORIGIN allow iframe message passing from origin --pidfile=PIDFILE publish pid of daemon process -p, --port=PORT select a port (default: 4200) -s, --service=SERVICE define one or more services -t, --disable-ssl disable transparent SSL support --disable-ssl-menu disallow changing transport mode --disable-utmp-logging disable logging to utmp and wtmp -q, --quiet turn off all messages --unixdomain-only=PATH:USER:GROUP:CHMOD listen on unix socket -u, --user=UID switch to this user (default: nobody) --user-css=STYLES defines user-selectable CSS options -v, --verbose enable logging messages --version prints version information --disable-peer-check disable peer check on a session
[root@redhat2 ~]# netstat -tulnp 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 11724/./shellinabox
/etc/init.d/iptables status
[root@redhat2 crazyeye]# /sbin/iptables -I INPUT -p tcp --dport 4200 -j ACCEPT #容許8080端口數據訪問 [root@redhat2 crazyeye]# /etc/init.d/iptables save #保存配置 iptables: Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
/etc/init.d/iptables stop
chkconfig --level 35 iptables off chkconfig iptables off
推文:Shellinabox:基於 Web 的遠程 Terminal 模擬器安裝使用詳解css
style="height:0;padding-bottom:100%"
<div id="page-content"> <div class="row"> <div class="col-lg-12"> <iframe src="http://192.168.218.129:4200/" width="100%" style="padding-bottom:100%;background-color:white;"></iframe> </div> </div> </div>