rmote
rmote runs Python functions on another machine over SSH. Use its built-in tools to manage files, packages, and services, or write a tool for your application. Calls return Python values and propagate remote exceptions to the caller.
Install rmote on your local machine. The target needs Python 3.11 or newer, but no rmote installation or agent. Tool code is sent when it is first used on a connection. Both machines must run a supported POSIX system; Windows remote hosts are not supported.
Install
python -m pip install rmote
Python 3.11 or newer is required locally too. Package and service tools also need the target's system commands and sufficient permissions. rmote does not install tool dependencies or elevate privileges automatically.
Read a Remote File
Replace user@server with a host you can reach using your SSH configuration.
Save this as read_hosts.py and run it with python read_hosts.py:
from rmote.sync import Connection
from rmote.tools import FileSystem
with Connection.from_ssh("user@server") as remote:
hosts = remote(FileSystem.read_str, "/etc/hosts")
assert "localhost" in hosts
print(hosts, end="")
The file is read on the target, with the SSH user's permissions. The with
block closes the connection. Connection.from_local() runs the same tools
in a local subprocess; async applications use rmote.protocol.Protocol.
The quickstart walks through deploying Redis to a Docker container: install its package, render a systemd unit, start the service, and verify it. Switching to SSH changes only the connector.
Guides
- Writing tools: define a remote operation and return Python data.
- Multiple hosts: run operations concurrently and handle individual failures.
- Templates: render configuration files.
- Built-in tools: files, commands, packages, services, users, and logging.
- Connection reference: SSH options, deadlines, and cleanup.
- Execution model: code transfer, state, concurrency, and cancellation.
Use rmote only with trusted hosts and tool code. It transfers executable Python and uses pickle for results. A timeout stops local waiting; it does not cancel an operation already running on the target.
Development
uv sync --group dev --group docs
make test
make docs
Some integration tests require Docker; SSH tests need local OpenSSH binaries.
Use uv run pytest --no-docker to exclude Docker tests. Named documentation
examples run through markdown-pytest alongside the Python tests.
rmote is beta software. See the release notes for changes and compatibility. Licensed under Apache 2.0.
Metadata
Release files for rmote 0.4.1
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 |
|---|---|---|---|---|
| rmote-0.4.1.tar.gz | 32.2 kB | With provenance | Details for rmote-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rmote-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for rmote-0.4.1-py3-none-any.whl |
Total release size: 71.4 kB
Release files / rmote-0.4.1.tar.gz
| Download URL | rmote-0.4.1.tar.gz |
|---|---|
| Size | 32.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a559a4091670f9d2f9cf1ce54d332a54d9d07ccb0a941a56976ec775a604627
|
|
BLAKE2b-256 checksum How to use checksums |
dbf618d1f556845258afffb5745403a87e1aeea29b1636c4bfad83ebd55dc176
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logRelease files / rmote-0.4.1-py3-none-any.whl
| Download URL | rmote-0.4.1-py3-none-any.whl |
|---|---|
| Size | 39.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
785b40eb0338656ffd19d73896083e68e31c4bae083cd60e225530fc81edcf0a
|
|
BLAKE2b-256 checksum How to use checksums |
235832661ca89c9aaea5012b7a698c3d8576c69656bcbf6aa80f38488e523717
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logSecurity for rmote 0.4.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rmote-0.4.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logA 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.