shellinabox安装和使用(web ssh)
2015-07-14 14:19
731 查看
我的博客已迁移到xdoujiang.com请去那边和我交流 The shellinaboxd daemon implements a webserver that listens on the specified port. The web server publishes one or more services that will be displayed in a VT100 emulator implemented as an AJAX web application. By default, the port is 4200 and the default service URL is http://localhost:4200/. If no particular service was requested,the server launches /bin/login querying the user for their username and password. It then starts the user s default login shell.Any modern JavaScript and CSS enabled browser will be able to access the published service without requiring additional plugins. Shellinabox是一个基于web的终端模拟器,采用C语言编写,使用Ajax与后端服务通信。 它实现了一个Webserver,默认监听4200端口,在支持Javascript和CSS的浏览器上访问http://host:4200即可。并且可以配置SSL/TLS证书,使用https方式加密通信。 一、基础环境 1、cat /etc/debian_version 7.8 2、uname -r 3.2.0-4-amd64 3、ip 10.1.10.117 二、shellinabox安装 1、直接使用apt-get安装shellinabox apt-get -y install shellinabox 2、使用dpkg来查看下一共安装哪些配置文件、命令、文档及路径在哪里 dpkg -L shellinabox /. /usr /usr/bin /usr/bin/shellinaboxd /usr/share /usr/share/man /usr/share/man/man1 /usr/share/man/man1/shellinaboxd.1.gz /usr/share/doc /usr/share/doc/shellinabox /usr/share/doc/shellinabox/changelog.Debian.gz /usr/share/doc/shellinabox/AUTHORS /usr/share/doc/shellinabox/TODO /usr/share/doc/shellinabox/examples /usr/share/doc/shellinabox/examples/cgi-mode-example.sh /usr/share/doc/shellinabox/changelog.gz /usr/share/doc/shellinabox/README /usr/share/doc/shellinabox/copyright /usr/share/doc/shellinabox/NEWS.gz /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/shellinabox /etc /etc/shellinabox /etc/shellinabox/options-enabled /etc/shellinabox/options-enabled/README /etc/shellinabox/options-available /etc/shellinabox/options-available/00_White On Black.css /etc/shellinabox/options-available/00+Black on White.css /etc/shellinabox/options-available/01_Monochrome.css /etc/shellinabox/options-available/README /etc/shellinabox/options-available/01+Color Terminal.css /etc/default /etc/default/shellinabox /etc/init.d /etc/init.d/shellinabox /etc/shellinabox/options-enabled/00_White On Black.css /etc/shellinabox/options-enabled/00+Black on White.css /etc/shellinabox/options-enabled/01_Monochrome.css /etc/shellinabox/options-enabled/01+Color Terminal.css 3、修改配置 1)先备份下配置文件 cp /etc/default/shellinabox /etc/default/shellinabox.bak 2)修改内容 diff /etc/default/shellinabox /etc/default/shellinabox.bak 5c5 < SHELLINABOX_PORT=8888 --- > SHELLINABOX_PORT=4200 18c18 < SHELLINABOX_ARGS="--no-beep -s /:SSH:10.1.10.117" --- > SHELLINABOX_ARGS="--no-beep" 3)参数说明 --no-beep not only are audible signals undesired in some working environments, but browser support for media playback is often buggy,too. Setting this option suppresses all audio playback and enables the visual bell by default. 4、重启服务 /etc/init.d/shellinabox restart 5、查看端口和进程 1)netstat -tupnl|grep shell tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 17230/shellinaboxd 2)ps -ef |grep shell 102 17230 1 0 00:11 ? 00:00:00 /usr/bin/shellinaboxd -q --background=/var/run/shellinaboxd.pid -c /var/lib/shellinabox -p 8888 -u shellinabox -g shellinabox --user-css Black on White:+/etc/shellinabox/options-enabled/00+Black on White.css,White On Black:-/etc/shellinabox/options-enabled/00_White On Black.css;Color Terminal:+/etc/shellinabox/options-enabled/01+Color Terminal.css,Monochrome:-/etc/shellinabox/options-enabled/01_Monochrome.css --no-beep -s /:SSH:10.1.10.117 102 17231 17230 0 00:11 ? 00:00:00 /usr/bin/shellinaboxd -q --background=/var/run/shellinaboxd.pid -c /var/lib/shellinabox -p 8888 -u shellinabox -g shellinabox --user-css Black on White:+/etc/shellinabox/options-enabled/00+Black on White.css,White On Black:-/etc/shellinabox/options-enabled/00_White On Black.css;Color Terminal:+/etc/shellinabox/options-enabled/01+Color Terminal.css,Monochrome:-/etc/shellinabox/options-enabled/01_Monochrome.css --no-beep -s /:SSH:10.1.10.117
三、web客户端测试
四、参考文章 http://www.tecmint.com/shell-in-a-box-a-web-based-ssh-terminal-to-access-remote-linux-servers/ https://github.com/shellinabox/shellinabox
相关文章推荐
- java-WEB中的监听器Lisener
- GUI - Web前端开发框架
- Extjs4.0 最新最全视频教程
- Linux Generating SSH Keys
- MyEclipse Web Project转Eclipse Dynamic Web Project
- axis备忘
- Erlang实现的一个Web服务器代码实例
- 防止网页脚本病毒执行的方法-from web
- 自学成才的秘密:115个 web Develop 资源
- 使用批处理修改web打印设置笔记 适用于IE
- Apache Web让JSP“动”起来
- web下载的ActiveX控件自动更新
- 推荐六款WEB上传组件性能测试与比较第1/10页
- 关于三种主流WEB架构的思考
- 使用 Iisext.vbs 列出 Web 服务扩展文件的方法
- 使用 Iisext.vbs 删除 Web 服务扩展文件的方法
- 使用 iisext.vbs 禁用 Web 服务扩展的方法
- 用vbs 实现从剪贴板中抓取一个 URL 然后在浏览器中打开该 Web 站点
- web标准知识——从p开始,循序渐进
- web标准知识――用途相似的标签