Web-Shell

Submitted by Erik Wegner on
Body

Ist es nicht möglich, sich direkt per ssh auf einem Server anzumelden, dann kann eine Web-Konsole helfen.

Neben Anyterm und Ajaxterm gibt es noch Shell in a box. Das Github-Repository ist schnell geklont und gebaut:

mkdir ~/build && cd ~/build && git clone https://github.com/shellinabox/shellinabox.git && cd shellinabox
autoreconf -i
./configure && make

Als nächstes wird ein systemd-Service unter /etc/systemd/system/shellinabox.service bereitgestellt (Quelle):

[Unit]
Description=Shell in a box
After=network.target nss-lookup.target

[Service]
User=root
ExecStart=/root/build/shellinabox/shellinaboxd -t --localhost-only -u 0
Restart=on-failure

[Install]
WantedBy=multi-user.target

Damit die Konsole innerhalb des Apache-Webservers eingebunden ist, können diese Direktiven verwendet werden:

<Location /webshell>
  AuthType Basic
  AuthName "Webshell"
  AuthBasicProvider ldap
  AuthLDAPURL "ldap://127.0.0.1:389/dc=company,dc=com"
  Require ldap-group cn=Webshell,ou=Applications,dc=company,dc=com

  ProxyPass http://localhost:4200
  ProxyPassReverse http://localhost:4200
</Location>