Zum Inhalt springen

Shellinabox/man

Aus Foxwiki

NAME

shellinaboxd - publish command line shell through AJAX interface

SYNOPSIS

shellinaboxd [ -b | --background[=pidfile] ] [ -c | --cert=certdir ] [ --cert-fd=fd ] [ --css=filename ] [ --cgi[=portrange] ] [ -d | --debug ] [ -f | --static-file=url:file ]  [ -g | --group=gid ] [ -h | --help ] [ --linkify=[none|normal|aggressive] ] [ --localhost-only ] [ --no-beep ] [ -n | --nu‐meric ] [ --pidfile=pidfile ] [ -p | --port=port ] [ -s | --service=service ] [ -t |  --disable-ssl ]  [ --disable-ssl-menu ]  [ -q |  --quiet ] [ -u | --user=uid ] [ --user-css=styles ] [ -v | --verbose ] [ --version ]

Beschreibung

Der shellinaboxd-Daemon implementiert einen Webserver, der den angegebenen Port überwacht. Der Webserver veröffentlicht einen oder mehrere Dienste, die in einem VT100-Emulator angezeigt werden, der als AJAX-Webanwendung implementiert ist. Standardmäßig lautet der Port 4200 und die Standard-Dienst-URL http://localhost:4200/.

Wenn kein bestimmter Dienst angefordert wurde, startet der Server /bin/login und fragt den Benutzer nach seinem Benutzernamen und Passwort. Anschließend wird die Standard-Anmeldeshell des Benutzers gestartet.

Jeder moderne JavaScript- und CSS-fähige Browser kann auf den veröffentlichten Dienst zugreifen, ohne dass zusätzliche Plugins erforderlich sind.

KONFIGURATION

Es gibt keine Konfigurationsdateien oder permanenten Einstellungen für shellinaboxd

Eine kleine Anzahl von Laufzeit-Konfigurationsoptionen ist über ein Kontextmenü verfügbar, das durch Klicken mit der rechten Maustaste aufgerufen wird. Diese Optionen werden in einem Browser-Cookie gespeichert.

Auf vielen Websites läuft bereits ein Webserver und sie möchten shellinaboxd in ihre bestehende Website integrieren. Dies geschieht in der Regel über einen Reverse-Proxy-Eintrag für den Hauptwebserver. Für Apache würde dies das Hinzufügen einer Option wie der folgenden erfordern:

<Location /shell>
ProxyPass http://localhost:4200/
Order allow,deny
Allow from all
</Location>

Wenn Sie einen anderen Webserver verwenden, lesen Sie in der Dokumentation dieses Servers nach, wie Reverse-Proxy-Vorgänge konfiguriert werden.

Bei Verwendung eines Reverse-Proxys wird normalerweise auch die Option --localhost-only aktiviert. Darüber hinaus kann auch die Option --disable-ssl in Betracht gezogen werden, je nach den genauen Konfigurationsdetails des Reverse-Proxys.

DIAGNOSTICS

The daemon returns a non-zero exit code in case of failure. With the exception of a small number of common error cases that are handled explicitly, most errors result in printing a "Check failed" message. This does not typically indicate a bug in the program but is instead its normal way of report‐ ing errors.

Common failure conditions are reusing a port that is already in use, lack of sufficient privileges to run a service, failure to find SSL/TLS certifi‐ cates, and failure to write newly generated certificates to the certification directory.

SECURITY

The daemon uses privilege separation techniques to allow it to drop privileges early. It is aware of setuid flags and restricts some operations when launched as a setuid application.

Despite these safety features, a bug could conceivably lead to a determined attacker gaining elevated privileges. It is therefore strongly discouraged to set the setuid flag on the binary.

The expected deployment would be from a system rc script launched by /sbin/init. For extra security, the --group and --user options should be used to change to a dedicated user.

BUGS

Due to browser limitations, some features might not be available to users of all browers.

Konqueror does not allow for reliable interception of CTRL keys. If you press a key together with the CTRL modifier, it continues performing the browser's predefined behavior for this particular key combination. In most cases, it also fails to report the correct key to the terminal emulator. As a work-around, pressing both the CTRL and the WINDOWS key sometimes works.

Some browsers, most notably IE on Windows, disallow interception of ALT keys and always interpret these keys as menu accelerators. As a work-around, many UNIX applications allow pressing ESC, instead of ALT.

When using non-US keyboard layouts, some browser do not allow for reliably determining shifted ALT keys. Please report these cases if they turn out to be a problem, as work-arounds might be possible.

Access to the native clipboard is typically not possible. Instead, an internal clipboard accessible from the right-button context menu is used for all but IE.

Some browsers restrict the number of concurrent connections to a server. This restricts how many AJAX terminals can be opened simultaneously. If this becomes a problem, users can typically reconfigure their browsers to raise the limit.

There have been reports of the VLC plugin on Linux/x86_64 crashing Firefox when the browser page gets reloaded. Setting the --no-beep option eliminates all references to VLC and thus appears to work around this crash.