Install webssh on Debian

You need to have PIP installed on your debian system. Check if it’s already installed, if not, install one of the available edition. My setup included

  • Debain 10 (buster)
  • PIP 3

Installing pip for Python 3

Perform the following steps as a user with sudo privileges to install Pip for Python 3 on Debian 10:

Start by updating the package list:

sudo apt update

Install pip for Python 3 and all of its dependencies with the following command:

sudo apt install python3-pip

Print the pip3 version to verify the installation:

pip3 --version

Installing pip for Python 2 (for backward compatible edition)

The following steps describe how to install Pip for Python 2 on Debian systems:

Start by updating the packages index:

sudo apt update

Install pip for Python 2 and all of its dependencies:

sudo apt install python-pip

Verify the installation by issuing the following command which will print the pip version:

pip --version

Quickstart for Webssh:

Install this app, run command

pip3 install webssh

Start a webserver

# start a http server with specified listen address and listen port (No SSL)

wssh --address='0.0.0.0' --port=8022 --fbidhttp=False

Now hit your browser with http://<your-server-ip>:8022

Below like screen will appear-

Webssh Hacks

# start a https server, certfile and keyfile must be passed
wssh --certfile='/path/to/cert.crt' --keyfile='/path/to/cert.key'

# missing host key policy
wssh --policy=reject

# logging level
wssh --logging=debug

# log to file
wssh --log-file-prefix=main.log

# more options
wssh --help

Docker installation

If you’re interested with docker you can also play around. It’s simple-

docker pull snsyzb/webssh
docker run -d -p 10000:10000 snsyzb/webssh wssh --address=0.0.0.0 --port=10000

The command above will start running a container listening the port 10000

or more tweaks you may browse the project link here- https://pypi.org/project/webssh/

Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.