linux下安装shellinabox实现web登录服务器
GitHub地址(含有文件下载和详细安装流程):https://github.com/shellinabox/shellinabox
这里我们使用的是redhat安装方法如下:
1.配置安装依赖环境
yum install git openssl-devel pam-devel zlib-devel autoconf automake libtool
2.下载shellinabox包,开始安装
(1)git远程获取,克隆源文件到项目目录
git clone https://github.com/shellinabox/shellinabox.git && cd shellinabox
(2)在页面下载zip文件,上传至服务器。
unzip shellinabox-master.zip
cd shellinabox-master
(3)在项目目录中运行自动工具
autoreconf -i
(4)编译运行配置文件(可设置项目存放位置)
./configure
./configure --prefix=/usr/local/shellinabox #设置项目存放位置
(5)执行安装程序
make && make install
3.进行测试
(1)启动程序(需要在管理员下启动,不然所有用户都无法登录)
[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: )
-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
所有参数
(2)可以查看程序运行端口
[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.0.0:* LISTEN /./shellinabox
(3)可能此时在主机上,依旧无法访问,需要配置防火墙
0.查看防火墙状态
/etc/init.d/iptables status
1.设置防火墙:
[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 ]
2.临时关闭防火墙
/etc/init.d/iptables stop
3.永久关闭,不随着我们下一次重启而启动
chkconfig --level 35 iptables off
chkconfig iptables off
(4)成功访问

推文:Shellinabox:基于 Web 的远程 Terminal 模拟器安装使用详解
4.使用iframe嵌入页面
(1)补充:一般设置div高度自适应方法
style="height:0;padding-bottom:100%"
(2)在使用shellinabox的web页面时使用iframe嵌入(不需要指定高度)
<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>
(3)实现效果

linux下安装shellinabox实现web登录服务器的更多相关文章
- linux下安装EJBCA 搭建私有CA服务器
linux下安装EJBCA 搭建私有CA服务器 EJBCA是一个全功能的JAVA的CA系统软件,我们可以用此搭建私有CA服务器: 一:首先我的测试环境: 1. linux mint18.3 62位: ...
- 用了一天的时间,linux下expect实现ssh自动登录服务器记,鄙视下网上各种抄来抄去残段子
因为要对客户方的快30个项目进行特别有顺序的重启,所以不得不想办法写个脚本,网上看了不少段子.真是残缺的可以.没有一段是可以正常运行的.我来按顺序记录一下 脚本的本身 使用expect实现自动登录的脚 ...
- linux下安装haproxy作为端口转发服务器,以及安装keepalived作为haproxy高可用方案
一.安装haproxy作为端口转发服务器(主服务器:172.28.5.4,备服务器:172.28.5.8,浮点IP为:172.28.5.6) 1.安装依赖包 yum -y install wget g ...
- Linux下安装PHP并在nginx服务器中进行配置的详细方法
先介绍一下使用的环境:centos 7.4, PHP 7.0 , nginx 1.12 Linux系统版本可以通过命令:lsb_release -a 查看. 现在开始步入正题了! 1. 首先查看一下 ...
- linux下安装好mysql后,登录时提示libgcc_s.so.1 must be installed for pthread_cancel to work
网上找了很多帖子,各说纷纭, 自己到https://centos.pkgs.org/下载对应版本的libgcc_s.so.1,使用rpm -ivh libgcc-4.8.5-16.el7.i686.r ...
- Linux下安装Tomcat服务器和部署Web应用
一.上传Tomcat服务器
- 转】Linux下安装Tomcat服务器和部署Web应用
原博文出自于: http://www.cnblogs.com/xdp-gacl/p/4097608.html 感谢! 一.上传Tomcat服务器
- Linux 下安装 Tomcat 服务器和部署 Web 应用
一.上传Tomcat服务器 二.安装Tomcat服务器 2.1.解压tomcat服务器压缩包 2.2.配置环境变量 tomcat服务器运行时是需要JDK支持的,所以必须配置好JDK用到的那些环境变量 ...
- 转 Linux下安装Tomcat服务器和部署Web应用
转载声明: http://www.cnblogs.com/xdp-gacl/p/4097608.html 一.上传Tomcat服务器
随机推荐
- 每日Scrum(10)
今天我们小组整合了下我们所编辑的程序,然后在界面上进行了修改和少部分的完善,现在就等着下午的验收了 任务展板 燃尽图如下:
- dazhewang数据库初设计
mysql> use dazhe; Database changed mysql> create table shops(id int primary key auto_increment ...
- Teamwork(The seventh day of the team)
做了很久,发现还是运行不了,很郁闷: 求大神指教这是什么错误?
- Virtualbox+Ubuntu安装,VERR_VMX_MSR_ALL_VMX_DISABLED解决
学习链接:基于VirtualBox虚拟机安装Ubuntu图文教程--娄老师 启动虚拟机遇到的问题:BIOS中VT-x在所有CPU模式下被禁用(VERR_VMX_MSR_ALL_VMX_DISABLED ...
- Anaconda 下libsvm的安装
方法一. 利用VS生成动态库的安装 详细可参考这篇博文进行操作:https://blog.csdn.net/jeryjeryjery/article/details/72628255 方法二. ...
- redis简介及增删改查
redis 是一个文档(nosql)数据库,工作与内存,主要用做高速缓存 缓存经常会查到的数据 存入的值默认是字符串 使用步骤: 1 从redis.io下载 2 点击redis-server.exe启 ...
- 未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件
发布的打包项目在本机测试好使,部署到客户服务器上报错 分析器错误消息: 未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Cu ...
- 使用FileReader对象的readAsDataURL方法来读取图像文件
使用FileReader对象的readAsDataURL方法来读取图像文件 FileReader对象的readAsDataURL方法可以将读取到的文件编码成Data URL.Data URL是一项 ...
- (转)web开发流程
a.项目经理与公司决策层的沟通,以确定这个需求有没有足够的人手和可行性去实现,以及与现有产品的依存关系. b.公司决策层与市场/策划部门的交流,这个过程将进行的相当充分,并且是反复.长期的,它致力于从 ...
- 深入理解JAVA虚拟机阅读笔记4——虚拟机类加载机制
虚拟机把描述类的Class文件加载到内存,并对数据进行校验.转换解析和初始化,最终形成可以被虚拟机直接使用的Java类型,这就是虚拟机的类加载机制. 在Java语言中,类型的加载.连接和初始化过程都是 ...