#ssh #cli #utilities #github #keys

app keysync

A utility to sync local authorized_keys file updated with your with Github, Gitlab, and Launchpad public keys

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

#2134 in Command line utilities

Download history 1/week @ 2023-11-04 3/week @ 2023-11-11 12/week @ 2023-11-18 40/week @ 2023-11-25 22/week @ 2023-12-02 10/week @ 2023-12-09 18/week @ 2023-12-23 1/week @ 2023-12-30 9/week @ 2024-01-06 4/week @ 2024-01-13 13/week @ 2024-01-20 18/week @ 2024-01-27 1/week @ 2024-02-03 42/week @ 2024-02-10 176/week @ 2024-02-17

237 downloads per month


1.5K SLoC


An SSH key syncing utility

CI CD Crates.io Crates.io License

Table of Contents
  1. About
  2. Installation
  3. Usage
  4. Building and Testing
  5. Contributing
  6. Status
  7. Built With
  8. Contact
  9. License

Keysync Demo


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 keysync

To display application use keysync help
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 https://gitlab.com.
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 /target/debug/.
cargo run -- <args> Will build and run an executable.


Testing all standard test can be done with rust built in test framework.
cargo test

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.
cargo doc

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.

Built With



Created by Ethan Budd
Email: budde25@protonmail.com


Dual-licensed under either either of the following:


~1M SLoC