9 releases (stable)
|4.0.0||Jun 13, 2022|
|3.0.3||Jan 25, 2021|
|3.0.0||Dec 6, 2020|
|2.0.0||Oct 22, 2020|
|0.1.4||Oct 13, 2020|
#741 in Command line utilities
An SSH key syncing utility
Table of Contents
Warning this project unmaintained and definitely over engineered, there are easier ways to fetch keys"
keysync is a command line utility and service to help keep your local authorized_keys file synced to a master copy of public keys.
The program allows syncing from Github, GitLab, Launchpad at the moment, custom url support is coming soon. It downloads and filters only keys that you don't already have a local copy of. This application can be used for either as one time sync when run, or running automatically in the background as a systemd service. You can have the file it updated at a preset interval or a custom cron expression, you can even support multiple users and providers.
Note: Automatic jobs will fail if the computer goes to sleep/hibernate. The systemd daemon is recommended primarily for servers. For personal computers it is recommended to just run the command manually whenever you add public keys.
Warning If you're Github, GitLab or Launchpad is compromised an attacker can upload their keys to gain access to you're computer. For security please do not set this program up for a root user, you're just asking for trouble.
If you have rust installed you can use cargo.
requires a the following packages to be install: libsqlite-dev, build-essential, libssl-dev (Debian names)
cargo install nxcloud
Other packaged binary's are available in Releases.
The binary name is
To display application use
keysync <subcommand> help for help with that subcommand.
Downloads the public keys from github for the username.
keysync get <username>
Downloads the public keys from GitLab for the username, a url must be provided or '' for
keysync get --gitlab <url> <username>
Adds automatic job for the user, where username is the Github or GitLab username.
Valid schedules are [Hourly, Daily, Weekly, Monthly, Custom].
keysync set <username> <schedule>
Adds automattic job for user with custom cron schedule.
keysync set <username> custom -c <cron>
Building and Testing
This repository is a standard rust project bin structure.
- Install Rust
- Install build-essential, libssl-dev, libsqlite3-dev (Linux)
apt install build-essential libssl-dev libsqlite3-dev(Debian based)
- Clone repository
Compile and Run
Rust support building or running with the following commands:
cargo build Will build an executable in
cargo run -- <args> Will build and run an executable.
Testing all standard test can be done with rust built in test framework.
Some tests cannot be completed with 100% reliability (for example they might fail without network access), this will run all ignored tests.
cargo test -- --ignored
Rust built in documentation tools can be generated.
To open with your default browser.
cargo doc --open
Contributions are completely welcome and encouraged!
Examples of contributing could include:
- Submitting a feature request or bug report.
- Asking for improved documentation.
- Code by creating a pull request.
Refer to Contributing
Development is still in progress with new features being planned.
Feel free to Contribute.
Created by Ethan Budd
Dual-licensed under either either of the following: