View and control remote terminals from your browser
Project description
TermPair – View and control remote terminals from your browser
It lets people collaborate, view, share, all in real time. And it's easy to use!
To try it, use pipx start the server
pipx run termpair serve
then share your terminal
pipx run termpair share -b
your browser will open, and you can view whatever is printed to the terminal.
It works with any program: vim, emacs, tmux, ssh, anything you want!
If you want the browser to be able to send input to your terminal, start sharing with the -a
flag as well:
pipx run termpair share -ba
By default it runs whichever shell you are using, such as bash
. But it can run any executable. Pass the --cmd
flag to customize this.
termpair share # shares current SHELL. Can run anything from within here, like vim.
termpair share --cmd $SHELL # equivalent to the above command
termpair share --cmd "python"
termpair share --cmd "gdb"
termpair share --cmd "gdb -p 1234"
Security Considerations
It should go without saying but this can be extremely dangerous if you use it improperly.
By using termpair, anyone with the sharable URL can
- view every keystroke you make (even passwords that appear hidden in the terminal)
- view every character output by the terminal
If you are in a public location, someone over your shoulder could see this url, or take a picture of it, providing them the ability to view or control your termpair session.
If you allow other users to control your terminal, they can
- run any commands
- view/modify/delete any files
- restart or corrupt your computer
- install a virus
- etc
If you run the server locally on the default host, none of this can happen. The security implications only apply if you are exposing the port to others.
Still interested? Read on!
System Requirements
Operating System: Tested on Linux. Should work on macOS. Probably doesn't work on Windows.
Python: 3.6
API
To view the API, run
termpair --help
Run Server
The server acts as a router between unix terminal broadcasting and the browser(s) that are remotely viewing the terminal.
$ termpair serve
INFO: Started server process [16592]
INFO: Waiting for application startup.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
You can now view terminals at http://127.0.0.1:8000, but you need to specify the terminal id.
Broadcast Your Terminal
To let others view your terminal
$ termpair share
Sharing all input and output of `bash -l`.
WARNING: Your terminal is viewable but NOT controllable from
localhost:8000/?id=e8a7c806102134022455ddd1841470ed
Type 'exit' to stop sharing.
When you are no longer sharing, you will see the secret string 'dxQDwwWms844' printed.
$ exit
logout
You are no longer broadcasting (dxQDwwWms844)
To let others view and remotely control your terminal
$ termpair share -a
...
WARNING: Your terminal is viewable AND controllable from
localhost:8000/?id=e8a7c806102134022455ddd1841470ed
...
Contributing
Clone repo, then
pip install -e .
to modify Python code.
To modify frontend code, run
make build_frontend
then reload the pyterm server with
termpair server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file termpair-0.0.0.1.tar.gz
.
File metadata
- Download URL: termpair-0.0.0.1.tar.gz
- Upload date:
- Size: 406.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f688bdc5158a64a50ef1109c01fcd448e967cef45164a27ecaf86d69798cb12 |
|
MD5 | 56800e61e15efdd5bb01f68c31990fc0 |
|
BLAKE2b-256 | 97527023d06e6f9daa740bf2ed912bda5558b36ee50ceb6fcf27147c1dd59483 |
File details
Details for the file termpair-0.0.0.1-py3-none-any.whl
.
File metadata
- Download URL: termpair-0.0.0.1-py3-none-any.whl
- Upload date:
- Size: 414.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8a6e6e7a8cf7a8ff4d7104b8051d519b4bdd58b6cd3b978a8eea8dd8b4b3f19 |
|
MD5 | 4ce401a68ce32b47a99de70c8065dfd9 |
|
BLAKE2b-256 | 08b5391f41650023b1ef131cec263e6c7e5f050455cab3f7d0e6f6398c083d6e |