Shell In A Box mengimplementasikan server web yang dapat mengekspor alat baris perintah arbitrer ke emulator terminal berbasis web. Emulator ini dapat diakses oleh semua browser web yang mendukung JavaScript dan CSS dan tidak memerlukan plugin browser tambahan apa pun.

https://github.com/shellinabox/shellinabox

Prasyarat

  1. Mesin linux ubuntu, saya menggunakan armbian64 bionic
  2. akses root
  3. internet

Remote mesin linux

Update repository

sudo apt-get update

hasil:

rahma@man20820:~$ sudo apt-get update
[sudo] password for rahma: 
Hit:2 http://ports.ubuntu.com bionic InRelease
Get:3 http://ports.ubuntu.com bionic-security InRelease [88.7 kB]
Get:4 http://ports.ubuntu.com bionic-updates InRelease [88.7 kB]               
Get:5 http://ports.ubuntu.com bionic-backports InRelease [74.6 kB]             
Get:6 http://ports.ubuntu.com bionic-security/main arm64 Packages [930 kB]     
Get:7 http://ports.ubuntu.com bionic-security/main armhf Packages [805 kB]     
Get:8 http://ports.ubuntu.com bionic-security/main Translation-en [310 kB]     
Get:9 http://ports.ubuntu.com bionic-security/restricted arm64 Packages [2480 B]
Get:10 http://ports.ubuntu.com bionic-security/restricted armhf Packages [7064 B]
Get:11 http://ports.ubuntu.com bionic-security/restricted Translation-en [34.6 kB]
Get:12 http://ports.ubuntu.com bionic-security/universe armhf Packages [893 kB]
Get:13 http://ports.ubuntu.com bionic-security/universe arm64 Packages [975 kB]
Get:14 http://ports.ubuntu.com bionic-security/universe Translation-en [251 kB]
Get:15 http://ports.ubuntu.com bionic-security/multiverse armhf Packages [2728 B]
Get:16 http://ports.ubuntu.com bionic-security/multiverse arm64 Packages [2720 B]
Get:17 http://ports.ubuntu.com bionic-security/multiverse Translation-en [4412 B]
Get:18 http://ports.ubuntu.com bionic-updates/main armhf Packages [1096 kB]    
Get:19 http://ports.ubuntu.com bionic-updates/main arm64 Packages [1228 kB]    
Get:20 http://ports.ubuntu.com bionic-updates/main Translation-en [402 kB]     
Get:21 http://ports.ubuntu.com bionic-updates/restricted arm64 Packages [3052 B]
Get:22 http://ports.ubuntu.com bionic-updates/restricted armhf Packages [10.9 kB]
Get:23 http://ports.ubuntu.com bionic-updates/restricted Translation-en [38.2 kB]
Get:24 http://ports.ubuntu.com bionic-updates/universe arm64 Packages [1515 kB]
Get:25 http://ports.ubuntu.com bionic-updates/universe armhf Packages [1424 kB]
Get:26 http://ports.ubuntu.com bionic-updates/universe Translation-en [365 kB] 
Get:27 http://ports.ubuntu.com bionic-updates/multiverse armhf Packages [6184 B]
Get:28 http://ports.ubuntu.com bionic-updates/multiverse arm64 Packages [4912 B]
Get:29 http://ports.ubuntu.com bionic-updates/multiverse Translation-en [6464 B]
Get:1 https://mirrors.tuna.tsinghua.edu.cn/armbian bionic InRelease [18.3 kB]  
Get:30 https://mirrors.tuna.tsinghua.edu.cn/armbian bionic/main armhf Packages [762 kB]
Get:31 https://mirrors.tuna.tsinghua.edu.cn/armbian bionic/main arm64 Packages [914 kB]
Get:32 https://mirrors.tuna.tsinghua.edu.cn/armbian bionic/bionic-utils arm64 Packages [4482 B]
Get:33 https://mirrors.tuna.tsinghua.edu.cn/armbian bionic/bionic-utils armhf Packages [4465 B]
Fetched 12.3 MB in 20s (613 kB/s)                                              
Reading package lists... Done

Install shell in a box

sudo apt-get install openssl shellinabox

hasil:

rahma@man20820:~$ sudo apt-get install openssl shellinabox
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  shellinabox
The following packages will be upgraded:
  openssl
1 upgraded, 1 newly installed, 0 to remove and 113 not upgraded.
Need to get 699 kB of archives.
After this operation, 504 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com bionic-security/main arm64 openssl arm64 1.1.1-1ubuntu2.1~18.04.9 [583 kB]
Get:2 http://ports.ubuntu.com bionic/universe arm64 shellinabox arm64 2.20build1 [115 kB]
Fetched 699 kB in 2s (285 kB/s)     
(Reading database ... 32594 files and directories currently installed.)
Preparing to unpack .../openssl_1.1.1-1ubuntu2.1~18.04.9_arm64.deb ...
Unpacking openssl (1.1.1-1ubuntu2.1~18.04.9) over (1.1.1-1ubuntu2.1~18.04.6) ...
Selecting previously unselected package shellinabox.
Preparing to unpack .../shellinabox_2.20build1_arm64.deb ...
Unpacking shellinabox (2.20build1) ...
Setting up shellinabox (2.20build1) ...
Setting up openssl (1.1.1-1ubuntu2.1~18.04.9) ...
Processing triggers for systemd (237-3ubuntu10.42) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

Konfigurasi shell in a box

edit file /etc/default/shellinabox menjadi seperti berikut:

# Should shellinaboxd start automatically
SHELLINABOX_DAEMON_START=1

# TCP port that shellinboxd's webserver listens on
SHELLINABOX_PORT=4200

# Parameters that are managed by the system and usually should not need
# changing:
SHELLINABOX_DATADIR=/var/lib/shellinabox
SHELLINABOX_USER=shellinabox
SHELLINABOX_GROUP=shellinabox

# Any optional arguments (e.g. extra service definitions).  Make sure
# that that argument is quoted.
#
#   Beeps are disabled because of reports of the VLC plugin crashing
#   Firefox on Linux/x86_64.
SHELLINABOX_ARGS="--no-beep --disable-ssl-menu --disable-ssl"

Restart service shellinabox

sudo service shellinabox restart

Akses menggunakan web browser

Selesai.