MCPcopy Index your code
hub / github.com/aluzzardi/wssh

github.com/aluzzardi/wssh @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
18 symbols 76 edges 8 files 10 documented · 56%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

wssh

wssh is a SSH to WebSockets Bridge that lets you invoke a remote shell using nothing but HTTP.

The client connecting to wssh doesn't need to speak the SSH protocol - rather, the SSH connection is terminated at the bridge level and the pty is wrapper through a thin layer of JSON and sent back to the client.

This means you can implement a WSSH client in just a few lines of code, even for a web browser.

Usage

Even though wssh primary purpose is to be used as a library in your applications, it ships with two command line tools: wsshd (the server) and wssh (the client).

$ wsshd 
wsshd/0.1.0 running on 0.0.0.0:5000
$ wssh aluzzardi@mba -p
Password: 
Last login: Mon Jul 23 23:20:27 2012 from localhost
aluzzardi@mba:~$ 

Web Interface

wsshd provides a web interface giving you access to a Javascript client

wssh: shell

wssh: vim

Creating your own server

wsshd is just a simple server implementation to demonstrate the wssh library.

You can actually integrate wssh into your own Python web application in order to provide terminal access. For instance, you may want to provide shell access to clients authenticated through OAuth to a special user account. The client doesn't need to know where the SSH server is located nor its credentials.

An example using the Flask framework is provided in examples/flask_server.py

Creating your own client

Beside the command line tool, wssh comes bundled with both a Python and a Javascript client library for the wssh bridge.

There are examples available in the examples/ directory for both languages.

You can write your own library in another language in just a few lines of code.

Core symbols most depended-on inside this repo

close
called by 6
wssh/server.py
_pty_size
called by 2
wssh/client.py
_resize
called by 2
wssh/client.py
_bridge
called by 2
wssh/server.py
_load_private_key
called by 1
wssh/server.py
open
called by 1
wssh/server.py
shell
called by 1
wssh/server.py
invoke_shell
called by 0
wssh/client.py

Shape

Method 9
Function 6
Class 2
Route 1

Languages

Python94%
TypeScript6%

Modules by API surface

wssh/server.py10 symbols
wssh/client.py5 symbols
examples/flask_server.py2 symbols
wssh/static/wssh.js1 symbols

For agents

$ claude mcp add wssh \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact