This article illustrates how to install Shell In A Box on your CORE9G25 Board to have access to Linux command line from the web interface.
Shell In A Box is a program create by Markus Gutschke that implements an in-browser command line shell. It works on any JavaScript and CSS enabled web browser.
Installing it on your Linux board you can get the access to the command prompt directly from web without any needs to install terminal software on your PC.
Installing Shell In A Box
From the CORE9G25 board command line install the shellinabox debian package by typing:
~# apt-get update ~# apt-get install shellinabox
When finished edit the file /etc/default/shellinabox by changing this line:
SHELLINABOX_ARGS="-s/:LOGIN -t --no-beep"
then restart the Shell In A Box daemon typing:
~# /etc/init.d/shellinabox restart
Create an user for the first login:
~# adduser acme ...
Open your browser on http://board_ip_address:4200 and see the prompt Login via web.
Use the CORE9G25 user to login and then if you need root privileges change to root by typing:
~# su ...
Access the command shell using the stardard web port 80
Lighttpd web server installed by default on the CORE9G25 board can be configured to provide a proxy service to route a web request on a specific url to another port.
For example we can open the Shell using this url: http://board_ip_address/shell instead of http://board_ip_address:4200.
Add in /etc/lighttpd/lighttpd.conf file the item "mod_proxy" in the server.modules section:
server.modules = ( "mod_access", "mod_alias", "mod_accesslog", "mod_compress", "mod_redirect", "mod_proxy" )
Add at the end of /etc/lighttpd/lighttpd.conf this lines:
proxy.server = ( "/shell" => ( ( "host" => "127.0.0.1", "port" => 4200 ) ) )
Now restart the web server by typing:
~# /etc/init.d/lighttpd restart
And access with your browser to the new url: http://board_ip_address/shell.
Change the shell CSS style
If you want to change the style of the shell it is possible to specify a CSS file in /etc/default/shellinabox changing this line:
SHELLINABOX_ARGS="-s/:LOGIN -t --no-beep"
in:
SHELLINABOX_ARGS="-s/:LOGIN -t --no-beep --static-file=styles.css:/etc/shellinabox/shellinabox.css"
Save a css file like this:
in /etc/shellinabox/ and restart the ShellInABox daemon:
~# /etc/init.d/shellinabox restart
Related links
Documentation Terms of Use
The Acme Systems srl provides this Debian system development and user manual.
The origin of these doc came from the website: http://www.acmesystems.it
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.