shellinabox : How to access ssh terminal in web browser on Linux Last updated on September 27, 2013
来源:互联网 发布:眼镜 知乎 编辑:程序博客网 时间:2024/06/11 07:25
http://xmodulo.com/access-ssh-terminal-web-browser-linux.html
这个比较全了
How to access ssh terminal in web browser on Linux
Running "everything" in a web browser used to be a bold statement. Due to the powerful HTML5/JavaScript stack, however, a web browser increasingly becomes a dominant application delivery platform. Even the Linux kernel sandboxed in a web browser no longer sounds so crazy these days.
In this tutorial, I describe how to access an SSH terminal in a web browser on Linux. Web-based SSH is useful when the firewall you are behind is so restrictive that only HTTP(s) traffic can get through.
Shell In A Box (or shellinabox) is a web-based terminal emulator which can run as a web-based SSH client. It comes with its own web server (shellinaboxd) which exports a command line shell to a web-based terminal emulator via AJAX interface. Shell In a Box only needs JavaScript/CSS support from a web browser, and does not require any additional browser plugin.
Install Shell In A Box on Linux
To install shellinabox on Debian, Ubuntu or Linux Mint:
To install shellinabox on Fedora:
To install shellinabox on CentOS or RHEL, first enable EPEL repository, and then run:
Configure Shellinaboxd Web Server
By default shellinaboxd web server listens on 4200 TCP port on localhost. In this tutorial, I change the default port to 443 for HTTPS. For that, modify shellinabox configuration as follows.
Configure shellinaboxd On Debian, Ubuntu or Linux Mint:
# TCP port that shellinboxd's webserver listens onSHELLINABOX_PORT=443# specify the IP address of a destination SSH serverSHELLINABOX_ARGS="--o-beep -s /:SSH:192.168.1.7"# if you want to restrict access to shellinaboxd from localhost onlySHELLINABOX_ARGS="--o-beep -s /:SSH:192.168.1.7 --localhost-only"
Configure shellinaboxd On Fedora, CentOS or RHEL:
# TCP port that shellinboxd's webserver listens onPORT=443# specify the IP address of a destination SSH serverOPTS="-s /:SSH:192.168.1.7"# if you want to restrict access to shellinaboxd from localhost onlyOPTS="-s /:SSH:192.168.1.7 --localhost-only"
Heads-up for Fedora users: According to the official document, some operations may not work out of the box when you run shellinaboxd in SELinux mode on Fedora. Refer to the document if you have any issue.
Provision a Self-Signed Certificate
During the installation of Shell In A Box, shellinaboxd attempts to create a new self-signed certificate (certificate.pem) by using /usr/bin/openssl if no suitable certificate is found on your Linux. The created certificate is then placed in /var/lib/shellinabox.
If no certificate is found in the directory for some reason, you can create one yourself as follows.
# cd /var/lib/shellinabox
# openssl genrsa -des3 -out server.key 1024
# openssl req -new -key server.key -out server.csr
# cp server.key server.key.org
# openssl rsa -in server.key.org -out server.key
# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
# cat server.crt server.key > certificate.pem
Run Shellinaboxd Web Server
On Debian, Ubuntu or Linux Mint:
On Fedora, CentOS or RHEL:
$ sudo systemctl start shellinaboxd.service
To verify if shellinaboxd is running:
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 4787/shellinaboxd
Now open up your web browser, and navigate to https://<IP_address_of_SSH_server>. You should be able to see a web-based SSH console, and log in to the remote SSH server via web browser interface.
- shellinabox : How to access ssh terminal in web browser on Linux Last updated on September 27, 2013
- How to access ssh terminal in web browser on Linux
- How to kill a particular user terminal on Linux
- How to set up Eclipse with Android SDK on Ubuntu linux 9.04/9.10 (updated)
- Linux: How to Enable SSH on Fedora 16
- How to use rar in console on linux.
- How to turn on RSH and RLOGIN in Linux?
- how to setup SSH on ubuntu
- How To Open An URL In Android’s Web Browser
- web terminal 探究:shellinabox使用心得
- How to determine who is logged on to a database by using Microsoft Jet UserRoster in Access 2000
- How to grant access to SQL logins on a standby database when the guest user is disabled in SQL Serve
- How to Install JPCap on Linux
- How to create ftp user on Linux
- How to configure rsh on redhat Linux
- How to install GSL on linux(ubuntu)
- How to Install Open vSwitch on Linux
- How to use vi on linux
- 「HD_ACM」 A+B for Input-Output Practice (I)
- Bootstrap按钮
- Linux笔记—Linux概述
- Bootstrap 工具Class
- Spring MVC的Controller统一异常处理:HandlerExceptionResolver
- shellinabox : How to access ssh terminal in web browser on Linux Last updated on September 27, 2013
- 图像视频去雾
- bootstrap 下拉菜单
- Codeforces Round #301 (Div. 2)
- Python高级特性:全局解释器锁GIL基本概念
- JDialog的使用
- bootstrap学习笔记之为导航条添加标题、二级菜单及状态
- 黑马程序员_Java学习日记 num1
- bootstrap学习笔记之基础导航条