3

I am trying to use Shell In A Box which implements a web server that can export arbitrary command line tools to a web based terminal emulator. This emulator is accessible to any JavaScript and CSS enabled web browser and does not require any additional browser plugins.

I am going through this GitHub repository to implement it.

When I run the shellinaboxd executable in terminal using

shellinaboxd --port 4201

and open the https://127.0.0.1:4201/ I get asked for login.

But when I type my name and hit enter I see Session Closed.

My /etc/default/shellinabox file looks like below :

# Should shellinaboxd start automatically
SHELLINABOX_DAEMON_START=1

# TCP port that shellinboxd's webserver listens on
SHELLINABOX_PORT=4200

# Parameters that are managed by the system and usually should not need
# changing:
# SHELLINABOX_DATADIR=/var/lib/shellinabox
# SHELLINABOX_USER=shellinabox
# SHELLINABOX_GROUP=shellinabox

# Any optional arguments (e.g. extra service definitions).  Make sure
# that that argument is quoted.
# SHELLINABOX_ARGS="--o-beep"
SHELLINABOX_ARGS="--disable-ssl-menu --service=/:LOGIN --no-beep --linkify=none --css=/etc/shellinabox/termstyle.css"

I tried the following too but it did not work:

  1. https://github.com/iptq/shellinabox/issues/142
  2. https://www.raspberrypi.org/forums/viewtopic.php?t=57724

My /etc/hosts file is as below:

127.0.0.1   localhost
127.0.0.1   abhishek-Latitude-3480


# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters 

If anyone have used shellinabox or can guide me with its usage will be a big help.

Videonauth
  • 33,845
  • Do the logs give any hints what happened in the moment the connection is dropped/closed? (i.e. /var/log/auth.log and /var/log/syslog and if shellinabox has an own log this one too) – Videonauth Dec 19 '17 at 12:59
  • Also I wonder why you not use the version within the repositories. – Videonauth Dec 19 '17 at 13:00
  • @Videonauth I installed openssh-server and allowed port in iptables using " sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT " and it worked. do not know how but can you shed any light on it ? – Abhishek Sharma Dec 20 '17 at 06:31

1 Answers1

1

Edit the /etc/default/shellinabox file using:

sudo vi /etc/default/shellinabox

and change the last line as:

--service=/:SSH:{remote_host}:{SSH_port}

Problem is solved!!!

Mahesh
  • 26