Skip to content

JiangKlijna/web-shell

Repository files navigation

web-shell

what is a Web shell?

Powered by

Web Shell Powered by gorilla/websocket, runletapp/go-console and xtermjs/xterm.js. And windows need rprichard/winpty.

Installation

from source code

git clone github.com/jiangklijna/web-shell
cd web-shell
make gen
make

from release

releases

Help

$ web-shell -h
Usage:
  web-shell [-s server mode] [-c client mode]  [-P port] [-u username] [-p password] [-cmd command]

Example:
  web-shell -s -P 2020 -u admin -p admin -cmd bash
  web-shell -c -H 192.168.1.1 -P 2020 -u admin -p admin

Options:
  -C string
        crt file
  -H string
        connect to host (default "127.0.0.1")
  -K string
        key file
  -P string
        listening port (default "2020")
  -RC string
        root crt file
  -c    client mode
  -cmd string
        command cmd or bash
  -cp string
        content path
  -h    this help
  -https
        enable https
  -p string
        password (default "webshell")
  -s    server mode
  -u string
        username (default "admin")
  -v    show version and exit

Installed on Kubernetes

Apply an example StatefulSet with Service & RBAC to your cluster:

kubectl apply -f manifests/statefulset.yaml

Service will be reachable on Port 80:

webshell

You can extend RBAC setting to reach more resource in the cluster. Or expose the Service with Ingress.

License

Source code in web-shell is available under the GPL-3.0 License.