witty/docs/en.search-data.min.cf01fda4defd8544061a2e23337262b5b8a853e9fa51a19761487bcf875291ac.json

1 line
9.4 KiB
JSON
Raw Normal View History

[{"id":0,"href":"/docs/install/","title":"Installation","section":"Table of content","content":"Installation # WiTTY runs on Linux (ARM and x86), macOS, and WSL2 (Windows subsystem for Linux, basically Linux). You can install from the pre-built binary or from the source code.\nFrom Binary Visit the release page of WiTTY at https://github.com/syssecfsu/witty/releases\n Download the release for your system\n Decompress the binary with the following command at selected location.\ntar -xzvf witty_vx.x.x_xxx.tar.gz\n For example, use tar -xzvf witty_v1.1.1_linux_amd64.tar.gz to decompress release v1.1.1 for Linux on AMD64.\n From Source Code Install the go compiler. Make sure you have go 1.17 or higher.\n Download the source code release and unzip it, or clone the repo\ngit clone https://github.com/syssecfsu/witty.git\n Go to the root directory of the source code and build the program with\n./build.sh\nThis shell script will build WiTTY and copy the binary with other needed files to the release/ directory. You can move the release/ directory to other places you want. Run WiTTY from this directory.\n macOS users can install go with homebrew. Note that macOS has its own version of golang installed. Do not remove it. Just add the path of newly installed golang at the beginning of the PATH environment variable. WiTTY uses go:embed to embed assets in the binary. Remember to re-build WiTTY after changing templates. Post-installation Configuration # WiTTY uses TLS to protect its traffic. You can request a free Let\u0026rsquo;s Encrypt cert or use a self-signed cert. Here is how to create a self-signed cert in the tls sub-directory:\n# Generate a private key for a curve\nopenssl ecparam -name prime256v1 -genkey -noout -out private-key.pem\n# Create a self-signed certificate\nopenssl req -new -x509 -key private-key.pem -out cert.pem -days 360\n Add a user to the user accounts, follow the instructions on screen to provide the password\n./witty adduser \u0026lt;username\u0026gt;\nWiTTY uses sub-commands for different functions. See details here Start the server and specify the command-line (CLI) program to run when user connects.\n./witty run bash\nIf so desired, you can disable user authenticate with -n/-naked, (not recommended). In the following example, WiTTY will run the ls command without user authentication:\n./witty run -naked ls\n WiTTY normally listens on port 8080. It can be overridden with the -p/-port option: Connect to the server with your browser at port 8080 or the one specified in step 6, for example\nhttps://\u0026lt;witty_server_ip\u0026gt;:8080\n Example Use Case # WiTTY doesn\u0026rsquo;t support Windows because Windows doesn\u0026rsquo;t have PTY. You can still use WiTTY to access Windows terminal through a proxy.\nHere is how to do it. We can run WiTTY on a Raspberry Pi running Raspbian (at address 192.168.1.2). When a user connects via browser to https://192.168.1.2:9000, WiTTY will start a new ssh session to the Windows machine (at address 192.168.1.3) running a SSH server. The command to run WiTTY on the RPI is as follows:\n./witty run -p 9000 ssh 192.168.1.3 -l user_name\nThe user can use any compatible browsers, such as that on a phone, to connect to the Windows machine without install a SSH client.\n mermaid.initialize({ \"flowchart\": { \"useMaxWidth\":true }, \"theme\": \"default\" } ) graph LR A[user on a phone] -- browser -- B[RPI: 192.168.1.1 runs WiTTY] B -- ssh -- C[Windows: 192.168.1.2 runs SSH server ] "},{"id":1,"href":"/docs/ui/","title":"User Interface","section":"Table of content","content":"Sub-commands # Similar to git and apt, WiTTY uses sub-commands for its various functions. WiTTY currently supports the following sub-commands: adduser, deluser, listusers, replay, merge, run.\n Sub-command Description adduser Add/update an authenticated user with their password deluser Delete an authenticated user listusers List all the authenticated users replay Replay a recorded session (set your terminal to 120x36 first) merge Merge several recorded sessions into