Shell in a Box - Remote to your Linux server via web browser

System Administrator usually use SSH to remote his Linux servers. So he might need a SSH client to do that. If he use a Linux client, his Linux might already have SSH client installed. If he use Windows client, one of the most popular SSH client is Putty.

We have already seen in NST Linux, we can SSH to the server via browser. Now, you can change you Linux server to become like that using shellinabox application.

What is shellinabox

Shellinabox is a web based terminal that uses Ajax technology to provide the look and feel of a native shell. Using this, as long as your device have a browser, you can remote to your Linux server.

Installation

On Ubuntu Linux :

$ sudo apt-get install shellinabox

On CentOS Linux :

Enable EPEL repository

# rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm

Verify EPEL repository is already in place

# yum repolist

Epel Repository

Install Shellinabox

# yum install openssl shellinabox

Install Shellinabox

How to Use Shellinabox

Once shellinabox installed, you need to make sure that shellinabox daemon is running.

On Ubuntu Linux :

$ sudo /etc/init.d/shellinabox start

On CentOS Linux :

# /etc/init.d/shellinaboxd start

By default, shellinabox is using port 4200. If you want to change it, you can configure shellinabox configuration file.

On Ubuntu Linux

$ sudo vi /etc/default/shellinaboxd

Configure Shellinabox Ubuntu

On CentOS Linux

# vi /etc/sysconfig/shellinaboxd

Configure Shellinabox CentOS

Change the PORT parameter into the port you want. Then restart the shellinaboxd service.

When everything is set, then its time to try shellinabox. You can point your browser to the server. Just type https://server_ip_address:4200 .

Here’s sample screenshots of shellinabox in action :

Google Chrome

Shellinabox Chrome

Mozilla Firefox

Shellinabox Firefox

Mozilla Firefox running Midnight Commander

Running Midnight Commander

Samsung Galaxy Tab browser

Samsung Galaxy Tab browser

If you right click on the shell, then you will have some simple options available.

Some options on shellinabox

Conclusion

Today with the power of AJAX or HTML5, a browser can running “almost” everything. As a cross platform application, shellinabox may help administrators to remote his machines almost anytime. As usual, you can always type man shellinaboxd or shellinaboxd --help to display its manual page and explore more detail.

About Pungki Arianto

Pungki , currently working as a Linux / Unix administrator for a banking company. He love to work in Linux / Unix since it's fun for him. He is also interested in information technology, information security and writing.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.

1 Comment

  1. Hi, I tried this concept then also I got the error to log in as any user in the browser. By spending lot time then only I found that you missed this rule while editing in the configuration file. I gave the details below.

    On CentOS Linux

    # vi /etc/sysconfig/shellinaboxd
    OPTS="--disable-ssl-menu -s /:LOGIN" #It wont allow to login in a browser
    OPTS="--disable-ssl-menu -s /:SSH" #It will allow to login as ssh in a browser