Skip to content

Browser based terminal using xterm.js and a python 3 server

License

Notifications You must be signed in to change notification settings

sorgloomer/websocket_terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

websocket_terminal

A cross-platform python3 server that bridges either ssh or raw tcp to the browser via websocket.

Quickstart

1. Clone and start

git clone https://github.com/sorgloomer/websocket_terminal.git
cd websocket_terminal
pip3 install -r requirements.txt
python3 websocket_terminal.py

2. Navigate browser

Open one of the following links in a browser:

Local ssh:

http://localhost:5002?kind=ssh&username=<username>&password=<password>

Remote ssh:

http://localhost:5002?kind=ssh&username=<username>&password=<password>&hostname=<ssh_hostname>

3. Enjoy

Screenshot of mc in the browser

Remarks

Currently only password authentication is supported for ssh. The username and password is sent in plaintext via http or https in the default implementation!

Credits

Thanks to aluzzardi for the wssh project, which inspired this one. The websocket and json based protocol is entirely the same as in wssh.

Greenlet and wsgi implementation: eventlet

Python ssh client: paramiko

Browser side terminal: xterm.js

About

Browser based terminal using xterm.js and a python 3 server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published