shellinaboxd
Serve a web-based terminal emulator
SYNOPSIS
shellinaboxd [OPTIONS] [--service=SERVICE]
Example: shellinaboxd -p 8080 --disable-ssl -s /bin/bash
Example: shellinaboxd -s "/usr/bin/ssh example.com" -u www-data -g www-data -c /etc/shellinabox/certificate.pem
PARAMETERS
--port=PORT, -p PORT
Specifies the TCP port for shellinaboxd to listen on. Default is 4200.
--disable-ssl, -t
Disables SSL/TLS encryption for connections. Highly discouraged for production environments due to security risks.
--cert=PATH, -c PATH
Specifies the path to the SSL certificate file (e.g., certificate.pem) to be used for HTTPS.
--shell=PATH, -s PATH
Sets the default shell or command to execute when a new session is established. Default is /bin/login.
--user=USER, -u USER
Specifies the user account under which the daemon process should run, usually for security reasons after initial setup.
--group=GROUP, -g GROUP
Specifies the group account under which the daemon process should run.
--service=SERVICE, --o SERVICE
Defines a service mapping, allowing different URLs to execute different commands or connect to different hosts/ports. Format: [
--background[=PIDFILE], -b[=PIDFILE]
Runs shellinaboxd in the background as a daemon. Optionally creates a PID file at the specified path.
--verbose, -v
Enables verbose output, providing more detailed logging information.
--debug, -d
Enables debug output, providing even more detailed logs, useful for troubleshooting.
--linkify
Automatically converts detected URLs in the terminal output into clickable links.
--user-css=PATH
Specifies a path to a custom CSS file to style the web interface.
DESCRIPTION
shellinaboxd is the daemon process for Shell In A Box, a web-based terminal emulator. It allows users to access a command-line interface (CLI) or an arbitrary command remotely through a standard web browser. The daemon acts as a server, listening for incoming HTTP or HTTPS connections, and then renders a fully functional terminal interface within the client's browser using JavaScript. This eliminates the need for specialized client software like SSH clients, making it convenient for remote administration, educational purposes, or providing quick access to a server from any device with a web browser. It supports SSL/TLS for secure communication and can be configured to serve specific user shells or other services.
CAVEATS
Security Risk: Exposing a shell over HTTP or unencrypted HTTPS (without a valid, trusted certificate) poses significant security risks. Always use HTTPS with a valid certificate.
Authentication: By default, it relies on system authentication mechanisms (e.g., /bin/login). Ensure strong passwords and proper user management on the host system.
Resource Usage: Each active session consumes system resources. Performance may degrade with many simultaneous users.
Limited Features: While functional, it may lack some advanced features found in native terminal emulators or SSH clients (e.g., direct file transfer, advanced key mappings).
USE CASES
- Remote server administration from any device with a web browser.
- Providing limited shell access to users without requiring SSH client setup.
- Educational purposes, allowing students to access a Linux environment easily.
- Embedding terminal access directly into web applications or dashboards.
WEB INTERFACE CUSTOMIZATION
shellinaboxd offers options to customize the appearance of the web terminal through CSS, allowing integration with existing web designs and branding.
HISTORY
Shell In A Box was primarily developed by Markus Gutschke and first released around 2008-2009. It emerged as a solution for providing convenient web-based access to a Linux shell, particularly useful in environments where traditional SSH clients might be blocked or unavailable, or for quick administrative tasks from various devices without prior client software installation. Its development provided a lightweight and accessible way to interact with servers directly from a web browser, predating the widespread adoption of more integrated cloud-based shell environments.