

First, though, you’ll need to add a firewall rule. In the next step, you’ll run and connect to it. Use pip install to install the WebSSH package: Virtual environments are more useful when working on your own projects, not when installing system-wide tools. WebSSH is designed to be installed and run directly from the command line, so you won’t need to set up another virtual environment as discussed in the How To Install Python 3 and Set Up a Programming Environment. If you’ve already installed Python and pip, you should be able to install Python packages from PyPI, the Python software repository. If you do not have your own domain name, you can use an IP address for the first two steps of this tutorial. You can obtain them by following How To Use Certbot Standalone Mode to Retrieve Let’s Encrypt SSL Certificates. Optionally, to enable HTTPS in the browser, you will need SSL certificates and your own domain name. You can install Python and pip on Ubuntu by following Step 1 of this tutorial. The Python programming language installed along with pip, its package manager. It can be useful to run WebSSH locally, but if you don’t have an SSH service running on a local machine, you can use a remote Linux server by following our initial server setup guide for Ubuntu 22.04. PrerequisitesĪ Windows, Mac, or Linux environment with a running SSH service. You will then optionally secure it with an SSL certificate and run it behind an Nginx reverse proxy for a production deployment. In this tutorial, you will set up WebSSH and connect over SSH in your browser.

Other web-based terminal stacks can be much more complicated, and specific to Linux. Finally, Python’s WebSSH in particular is very portable and requires no dependencies other than Python to get up and running. It can also be helpful in educational settings when granting access to command line novices, as it avoids them needing to install software on their machines (especially on Windows, where the default options come with caveats). It is particularly helpful for giving live presentations or demos, when it would be challenging to share a regular terminal window in a way that makes visual sense. This can be useful in a number of situations.

Some tools, like Python’s WebSSH, make it possible to connect over SSH and run a terminal directly in your web browser.

Ordinarily, you connect to an SSH server using a command line app in a terminal, or terminal emulator software that includes an SSH client.
