Web-based SSH clients are applications that allow users to access Secure Shell (SSH) servers through a web browser. They consist of two main parts: a client-side component, which is typically implemented using JavaScript and dynamic HTML, and a server-side or web application component, which is typically implemented on an application server.
The client-side component captures keystrokes, transmits messages to and from the server, and displays the results in the user's web browser. The server-side component processes incoming requests and forwards keyboard events to a secure shell client that communicates with the connected SSH server. Terminal output is either passed to the client, where it is converted into HTML using JavaScript, or it is translated into HTML by the server before it is transmitted to the client.
Web-based SSH servers can use either client-side or server-side terminal emulation.
Client-side terminal emulation transmits the raw terminal output from the SSH server directly to the client, which has the advantage of offloading the process of translating terminal output into HTML onto the client. However, it can be limited by the capabilities of JavaScript and can use a significant amount of the client's CPU and memory.
An example of a client-side terminal emulator is vt100.js.1
Server-side terminal emulation keeps track of the terminal screen and state in memory and converts it to HTML when a screen update occurs or when the client requests an update. This method has the advantage of keeping the state of the terminal persistent even if the user connects to their existing session from a different web browser, but it can use more CPU and memory on the server.
An example of a server-side terminal emulator is terminal.py.2
The main advantages of web-based SSH can be summarized as follows:
The following issues have to be considered and are important when using a web-based SSH client:
"Google Code Archive - Long-term storage for Google Code Project Hosting". https://code.google.com/p/shellinabox/source/browse/demo/vt100.js ↩
"Terminal.py - A Pure Python Terminal Emulator — Gate One 1.2.0 documentation". https://liftoff.github.io/GateOne/Developer/terminal.html ↩
jcterm claims to be able to handle port forwarding, such as X11 forwarding http://www.jcraft.com/jcterm/ ↩
"Secure Shell App". https://chrome.google.com/webstore/detail/iodihamcpbpeioajjeobimgagajmlibd ↩
Chromium Secure Shell FAQ https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/FAQ.md ↩
nassh-relay GitHub repository https://github.com/zyclonite/nassh-relay ↩
"Shellinabox". GitHub. 28 October 2021. https://github.com/shellinabox/shellinabox ↩
"Webssh: Web based SSH client". https://pypi.org/project/webssh/ ↩
Bastillion - Web-Based SSH Access and Key Management https://www.bastillion.io ↩