pytmate
什么是tmate
tmate是一款可以用于终端分享的工具,同时也提供了平台能力,用户可以使用平台将内网中的终端分享到外网访问。
什么是pytmate
tmate本身只支持类Unix系统(MacOS、Linux等),不支持Windows。而pytmate使用纯Python开发,可以支持全系统,使用也更加方便。
环境要求
- Windows 7以上(推荐使用
Windows 10 1809以上,低版本不支持pty) - Linux
- MacOS
Python版本要求>=3.6
安装
$ pip install tmate
如何使用
$ tmate
[TMateClient] Connect SSH server ssh.tmate.io:22...
[Notify] web session read only: https://tmate.io/t/ro-Q5VKGqmt24FxTnUqtdzCZHhtR
[Notify] ssh session read only: ssh ro-Q5VKGqmt24FxTnUqtdzCZHhtR@xxx.tmate.io
[Notify] web session: https://tmate.io/t/9bv76cP3W95ftZFbWtYtW4xJ7
[Notify] ssh session: ssh 9bv76cP3W95ftZFbWtYtW4xJ7@xxx.tmate.io
Web端访问终端可以在浏览器中打开web session: 后面的URL。
SSH访问可以使用ssh session: 后面的命令行。
在线调试Github Actions
创建以下workflow:remote-ssh.yml
name: Remote-SSH
on:
watch:
types: started
jobs:
SSH:
name: Run on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: [3.6]
os: [windows-latest, ubuntu-latest, macOS-latest]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U tmate
- name: SSH connection to Actions
run: |
python -m tmate
Star项目会自动触发该workflow。
Metadata
Release files for tmate 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tmate-0.1.5.tar.gz | 9.4 kB | Without provenance | Details for tmate-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tmate-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for tmate-0.1.5-py3-none-any.whl |
Total release size: 18.7 kB
Release files / tmate-0.1.5.tar.gz
| Download URL | tmate-0.1.5.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
113da0cac43149594cfafcb666e7fe12788696ff127716ba50a1e19e2e4f3ec0
|
|
BLAKE2b-256 checksum How to use checksums |
17a566a48ba1ffa0f9052b1cae44e0e3bd94d98c1978be7d84ac15ddfc536628
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Release files / tmate-0.1.5-py3-none-any.whl
| Download URL | tmate-0.1.5-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57c963bb8c9cc12e15653514df8a069325add0766ef7b5b701a02dc1d07dc1f5
|
|
BLAKE2b-256 checksum How to use checksums |
35de816ec4658323572fca0c0e3fb74aa5a30b9101da2e40c64f1bc8487e289a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Security for tmate 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.