Tutorial: web-ssh

I was looking for a web based terminal emulator and finally found "Shell In A Box".
It is a linux service that is running a webservice that uses JS/CSS to build up a great web based terminal.

Installation is easy because it is part of all major repositories:

apt-get install openssl shellinabox

The default settings are ok but you can change some values:

nano /etc/default/shellinabox


# Should shellinaboxd start automatically

# TCP port that shellinboxd's webserver listens on

# Parameters that are managed by the system and usually should not need
# changing:
# SHELLINABOX_DATADIR=/var/lib/shellinabox
# SHELLINABOX_USER=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 --localhost-only"

# specify the IP address and the post of a destination SSH
#SHELLINABOX_ARGS="--o-beep -s /:SSH: -p 22 --disable-ssl-menu"

One important setting:


So you can use your favorite web server to secure the access to the local shellinabox service (recommended).

A lighttpd configuration would look like this:

$HTTP["host"] =~ "shell.domain.com" {
  auth.backend = "htpasswd"
  auth.backend.htpasswd.userfile = "/etc/lighttpd/shell"
  auth.require = ("/" => (
     "method" => "basic",
     "realm" => "shell",
     "require" => "valid-user"

  proxy.balance = "fair"
  proxy.server = ( "" => (
                ( "host" => "", "port" => 4200 )

Some screenshots of the web frontend: