Shell in a Box

From The World according to Vissie
Jump to navigation Jump to search

Shell in a Box

http://www.linuxintro.org/wiki/Shell_in_a_box
https://www.linuxhelp.com/how-to-install-shell-in-a-box-access-remote-linux-servers/
https://github.com/shellinabox/shellinabox

Install

sudo apt-get update
sudo apt-get install openssl shellinabox
sudo apt-get install sudo

Configure

sudo vi /etc/default/shellinabox

start

sudo service shellinaboxd start

run

sudo netstat -nap | grep shellinabox

or

netstat -nap | grep shellinabox
https://Your-IP-Adress:4200. 

Apache

We’ll be installing Apache for a few reasons. Since Shellinabox requires SSL we can use an Apache reverse proxy so that we can use a Let’s Encrypt certificate to get the SSL certificate for free. We’ll also be using it to proxy the non standard port that Shellinabox uses (that is blocked in most business firewalls) to the standard HTTPS port which is 443.

sudo apt-get install apache2
sudo a2enmod ssl
sudo apt-get install libapache2-mod-proxy-html
sudo a2enmod proxy_http

wetty

https://github.com/krishnasrinivas/wetty

install

Install nodejs and npm : nodeJS

I had MANY issues building this.

Secondly I had issues re utf8. This seems to be a Debian bug. I fixed this with the following "patch": Workaround There is a Debian Unstable patch that is disputed for fixing the issue. This patch can be manully applied by replacing the following snippet of code in /usr/include/nodejs/deps/v8/include/v8.h:

 enum WriteOptions {
   NO_OPTIONS = 0,
   HINT_MANY_WRITES_EXPECTED = 1,
   NO_NULL_TERMINATION = 2,
   PRESERVE_ASCII_NULL = 4
 };

with:

 enum WriteOptions {
   NO_OPTIONS = 0,
   HINT_MANY_WRITES_EXPECTED = 1,
   NO_NULL_TERMINATION = 2,
   PRESERVE_ASCII_NULL = 4,
   REPLACE_INVALID_UTF8 = 0
 };

install cert

https://certbot.eff.org/lets-encrypt/debianjessie-other

Desktop in a browser

http://www.linuxintro.org/wiki/GuacAMole

Butterfly

https://github.com/paradoxxxzero/butterfly/wiki/Butterfly-with-nginx-reverse-proxy-and-https