.github/workflows | ||
distant-core | ||
distant-ssh2 | ||
src | ||
tests | ||
.gitignore | ||
BUILDING.md | ||
Cargo.lock | ||
Cargo.toml | ||
CHANGELOG.md | ||
Dockerfile | ||
README.md |
distant - remotely edit files and run programs
Operating System | Status |
---|---|
MacOS (x86, ARM) | |
Linux (x86) | |
Windows (x86) |
🚧 (Alpha stage software) This program is in rapid development and may break or change frequently! 🚧
Details
The distant
binary supplies both a server and client component as well as
a command to start a server and configure the local client to be able to
talk to the server.
- Asynchronous in nature, powered by
tokio
- Data is serialized to send across the wire via
CBOR
- Encryption & authentication are handled via XChaCha20Poly1305 for an authenticated encryption scheme via RustCrypto/ChaCha20Poly1305
Additionally, the core of the distant client and server codebase can be pulled
in to be used with your own Rust crates via the distant-core
crate.
Installation
Prebuilt Binaries
If you would like a pre-built binary, check out the releases section.
Building from Source
If you have cargo
installed, you can
directly download and build the source via:
cargo install distant
Alternatively, you can clone this repository and build from source following the build guide.
Examples
Launch a remote instance of distant
. Calling launch
will do the following:
- Ssh into the specified host (in the below example,
my.example.com
) - Execute
distant listen --host ssh
on the remote machine - Receive on the local machine the credentials needed to connect to the server
- Depending on the options specified, print/store/use the session settings so
future calls to
distant action
can connect
# Connects to my.example.com on port 22 via SSH to start a new session
# and print out information to configure your system to talk to it
distant launch my.example.com
# NOTE: If you are using sh, bash, or zsh, you can automatically set the
appropriate environment variables using the following
eval "$(distant launch my.example.com)"
# After the session is established, you can perform different operations
# on the remote machine via `distant action {command} [args]`
distant action copy path/to/file new/path/to/file
distant action spawn -- echo 'Hello, this is from the other side'
License
This project is licensed under either of
Apache License, Version 2.0, (LICENSE-APACHE or apache-license) MIT license (LICENSE-MIT or mit-license) at your option.