Difference between revisions of "Shell in a box"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
(make it persistant)
Line 28: Line 28:
 
* test it by surfing to your computer: http://localhost:4200
 
* test it by surfing to your computer: http://localhost:4200
  
use proxypass in the [[apache]] configuration to forward to its port
+
= Make it persistant =
 +
You want the shell in a box daemon shellinaboxd to be started when booting your machine, so add the following line to /etc/init.d/boot.local:
 +
shellinaboxd &
  
 
= Co-exist with a web server =
 
= Co-exist with a web server =
Line 38: Line 40:
 
* enable a reverse proxy. To do this, edit /etc/sysconfig/apache2 and add the following words to APACHE_MODULES: proxy proxy_http. In the end your line may read like this:
 
* enable a reverse proxy. To do this, edit /etc/sysconfig/apache2 and add the following words to APACHE_MODULES: proxy proxy_http. In the end your line may read like this:
 
  APACHE_MODULES="actions alias auth_basic proxy proxy_http authn_file authz_host authz_groupfile authz_default authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5"
 
  APACHE_MODULES="actions alias auth_basic proxy proxy_http authn_file authz_host authz_groupfile authz_default authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5"
 +
 +
use proxypass in the [[apache]] configuration to forward to its port
 +
  
 
= See also =
 
= See also =

Revision as of 17:21, 27 December 2011

Shell in a Box allows you to control a computer over the network using a Linux console in a web page.

  • Download shell in a box from google
wget http://shellinabox.googlecode.com/files/shellinabox-2.10.tar.gz
tar xvzf shellinabox-2.10.tar.gz
yast -i make
cd shellinabox-2.10
./configure && make && make install
  • make sure the firewall is open, here is an example for SUSE Linux:
rcSuSEfirewall2 stop
  • add a user for shell in a box, in this example user
useradd -m user
passwd user
  • call shell in a box
shellinaboxd &

Make it persistant

You want the shell in a box daemon shellinaboxd to be started when booting your machine, so add the following line to /etc/init.d/boot.local:

shellinaboxd &

Co-exist with a web server

You probably want shell in a box to be reachable via port 80 (so you can use it from within a typical corporate network) and you may want to run a web server on the same machine. So here is how you integrate shell in a box into an Apache2 web server

  • install apache2, in this example for SUSE Linux 12.1:
yast -i apache2
  • enable a reverse proxy. To do this, edit /etc/sysconfig/apache2 and add the following words to APACHE_MODULES: proxy proxy_http. In the end your line may read like this:
APACHE_MODULES="actions alias auth_basic proxy proxy_http authn_file authz_host authz_groupfile authz_default authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5"

use proxypass in the apache configuration to forward to its port


See also


This article is a stub and needs improvement. You can help here :)