It also provides SSL by default. You can make self signed certificates or simply accept the exeption when your browser complains about the certificate (it is still secure because you know you are you ).
So why use this?
Well sometimes it can be nice to have some more space for reports and scripts.
CLI programs like glances, iftop and Atop need some more space than a traditional terminal.
So to test it I compiled shellinabox-git from the AUR.
Then I simply started it with
Code: Select all
shellinaboxd
This started the daemon in "live mode" so I wen to my browser and typed https://localhost:4200
(4200 is the default but you can change it)
..And there my terminal was.
I fired up atop and htop and everything worked just like in the terminal.
But in my real terminal shellinaboxd was running so to stop it I had to do a CTRL+C.
When you do that there is no way of restarting it again because the port 4200 will be taken no matter how much you kill shellinaboxd. The port 4200 is taken so you cannot start it again.
(booting the computer will take care of it - I cannot figure out any other way of doing it).
This slight annoyance is typical and happens with all programs that use a port, so it is not shellinabox specific.
So it makes sense to start shellinabox in the background so you do not have to cancel it in your terminal.
You can do this by simply typing
Code: Select all
shellinaboxd -b
Now your terminal will be free for use and shellinabox is running so you can go to the browser and type localhost:4200.
...
I noticed that programs like inxi and glances did not show all that well on the white browser background so I decided to hook this up with a stylesheet that made the background black with greenyellow fonts so I created black.css with these data:
Code: Select all
body {
background: black;
color: greenyellow;
}
if this is in the same directory where you start your shellinabox from the colors will be adjusted. You can specify an address if this is not the case.
So if you put the stylesheet black.css in ~/public_html this would be how to start shellinabox in the background:
Code: Select all
shellinaboxd -b --css ~/public_html/black.css
And now my binfo script and inxi etc look good in my new browser terminal:
Naturally you can run this on other servers in the network - it does not have to be localhost.
All commands work just like in the terminal also within glances, htop etc and you get an additional right-click menu.
Here I have iftop running in Chromium:
Centos has shellinabox in the epel repo. Fedora has it in the repos. Debian 8 has it in the repos. Mint has it in the repos. That means that most distros have it - Mageia doesn't though.