weh shell tall on? You achieve a culture and education
I. Overview
In many fort machine, IT audit and other platforms will basically put a web version of ssh, users can realize the server shell operation in the web interface. Or we can not use these tools behind a firewall to access the remote system, or firewall only allows HTTPS traffic to pass. Then how can the server does it?
Two, shellinaboxd
By Markus Gutschke the development of a free and open source terminal emulator Web-based Ajax. Use shellainbox not need to install any similar XShell or Putty communication tools, do not have to install any plug-ins or third-party applications, you only need to have a support JavaScript and CSS in modern browsers offer similar native Shell through a Web browser look and feel. shellinaboxd daemon implements a Web server can listen on the specified port. However, this is not necessarily a security software, I do not recommend the public Internet to expose it.
1) Installation shellinabox
In this paper, for example centos 7.5
Using yum install
[root@yunwsn /]# yum install shellinabox -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package shellinabox.x86_64 0:2.20-5.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================
Package Arch Version Repository Size
====================================================================================
Installing:
shellinabox x86_64 2.20-5.el7 epel 136 k
Transaction Summary
====================================================================================
Install 1 Package
Total download size: 136 k
Installed size: 503 k
Downloading packages:
shellinabox-2.20-5.el7.x86_64.rpm | 136 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : shellinabox-2.20-5.el7.x86_64 1/1
Verifying : shellinabox-2.20-5.el7.x86_64 1/1
Installed:
shellinabox.x86_64 0:2.20-5.el7
Complete!
[root@yunwsn /]#
Start Service
[root@yunwsn /]# systemctl start shellinaboxd.service
[root@yunwsn /]# systemctl status shellinaboxd.service
● shellinaboxd.service - Shell In A Box daemon
Loaded: loaded (/usr/lib/systemd/system/shellinaboxd.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2019-06-03 14:23:54 CST; 7s ago
Docs: man:shellinaboxd(1)
Main PID: 30454 (shellinaboxd)
CGroup: /system.slice/shellinaboxd.service
├─30454 /usr/sbin/shellinaboxd -u shellinabox -g shellinabox --cert=/v...
└─30455 /usr/sbin/shellinaboxd -u shellinabox -g shellinabox --cert=/v...
View port
[root@yunwsn /]# netstat -natlp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 876/sshd
tcp 0 0 0.0.0.0:4200 0.0.0.0:* LISTEN 30454/shellinaboxd
You can see the default port is 4200
2) Use shellainbox
Open the Web page using https: // ip: 4200 (note: https must be open)
Login (note that does not support the root user can only use the ordinary user login)
3) Modify the port number
Modify the configuration file, you can modify PORT
vi /etc/sysconfig/shellinaboxd
# Basic options
USER=shellinabox
GROUP=shellinabox
CERTDIR=/var/lib/shellinabox
PORT=443
OPTS="--disable-ssl-menu -s /:LOGIN"
Restart Service
systemctl restart shellinaboxd.service
View port
tcp 0 0 10.104.145.137:443 116.21.13.32:39703 ESTABLISHED 31255/shellinaboxd
Finish
Micro-channel public number ~ operation and maintenance teenager