🔥 Holiday Sale! 25% Off Platinum Membership $399.99 $299.99 (ends December 31).

How to install Shellinabox on ubuntu?

Shell In A Box implements a web server that listens on a specified port and offers a web-based terminal emulator to remotely control you Linux Server. This post explains how to install Shellinabox on Ubuntu. It runs as an AJAX web application listening to port 4200 by default and available at http://localhost:4200. It allows users to login using their username and password and grants access to their login shell, exactly like SSH remote access. Any modern JavaScript and CSS enabled browser will be able to access the published service without requiring additional plugins. More details are available in the manual page. Recently, I described how to install SSH server on Ubuntu. Shellinabox adds a layer of convenience to your SSH server. While the procedure below describes how to install Shellinabox on Ubuntu, it may work on other distributions as well.

Install Shellinabox

Download Shellinabox

Whether or not you need to download and the way to download depends on what release of Ubuntu you are one. Shellinabox is available through the Universe repository for many releases, including 12.10 Quantal Quetzal. So the first step is to ensure that your Universe repository is enabled:

sudo nano /etc/apt/sources.list

Sources List Universe Repository | Smarthomebeginner
Sources List - Universe Repository

Ensure that the Universe Repository for your release is not commented out (there should be no # in front of the colored lines). Next update and search the apt cache for Shellinabox:

sudo apt-get update
sudo apt-cache search shellinabox

If the search returns a result, then you can install Shellinabox from the repository. If not can download the .deb or .rpm packages for your distribution from here. This tutorial shows you how to install Shellinabox on Ubuntu 12.04 LTS, for which the download commands are given below:

32-bit / 64-bit:

Both 32-bit (shellinabox_2.14-1_i386.deb) and the 64-bit (shellinabox_2.14-1_amd64.deb) binaries are available here. Or, you could use one of the commands below.

wget http://archive.ubuntu.com/ubuntu/pool/universe/s/shellinabox/shellinabox_2.14-1_i386.deb
Or 
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/shellinabox/shellinabox_2.14-1_amd64.deb

Recommended Guides Secure Shell/SSH:

Install Shellinabox

After downloading, you can install Shellinabox using the following command on Ubuntu (or you can use your GUI package installer that comes with many desktop environments):

32-bit:

sudo dpkg -i shellinabox_2.14-1_i386.deb

64-bit:

sudo dpkg -i shellinabox_2.14-1_amd64.deb

| SmarthomebeginnerAccess Shellinabox

After you install Shellinabox, you can access Shellinabox using the following URL:

http://localhost:4200

Login using your username and password and you should be directed to your shell. You can right-click to access several options and actions, including changing the look of your shell. You can start, stop, or reload your Shellinabox using the following commands:

sudo service shellinabox start
sudo service shellinabox stop
sudo service shellinabox reload

Recommended Improvements

I strongly recommend that you follow the steps below to secure your Shellinbox and make it more convenient to use:

  1. Create bash aliases, as described in this post, to make it convenient to start, stop, and reload Shellinabox:
    alias shellstart='sudo service shellinabox start'
    alias shellstop='sudo service shellinabox stop'
    alias shellreload='sudo service shellinabox reload'
    

    You can now use shellstart, shellstop, and shellreload from commandline to start, stop, and reload Shellinabox.

  2. Change default port, enable SSL, enable Apache Authentication Realm and reverse proxy, as described in this post, to secure your Shellinabox falling to the hands of hackers.

Install Shellinabox and enjoy the easy SSH access to your Linux server. Don't forget to secure it prior to enabling access through the internet.

Be the 1 in 200,000. Help us sustain what we do.
123 / 150 by Dec 31, 2024
You will gain benefits such as Deployarr access, discord roles, exclusive content, ad-free browsing, and more.
🔥 Holiday Sale! 25% Off Platinum Membership $399.99 $299.99 (ends December 31).
Join the Geek Army (starting from just $1.67/month)

Anand

Anand is a self-learned computer enthusiast, hopeless tinkerer (if it ain't broke, fix it), a part-time blogger, and a Scientist during the day. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs.

Holiday Sale