{"id":17925938,"url":"https://github.com/shoenig/ssh-key-sync","last_synced_at":"2026-04-11T16:09:49.398Z","repository":{"id":27611254,"uuid":"114599544","full_name":"shoenig/ssh-key-sync","owner":"shoenig","description":"A tool for synchronizing your GitHub SSH keys onto servers authorized_keys files","archived":false,"fork":false,"pushed_at":"2026-04-11T14:37:36.000Z","size":154,"stargazers_count":60,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-11T15:17:05.097Z","etag":null,"topics":["github","go","golang","ssh","ssh-key","ssh-key-manager","sync"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shoenig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-12-18T05:31:51.000Z","updated_at":"2026-04-11T14:37:40.000Z","dependencies_parsed_at":"2024-01-18T05:42:27.454Z","dependency_job_id":"159d7c91-254e-4714-a202-e8b17bb1b2f1","html_url":"https://github.com/shoenig/ssh-key-sync","commit_stats":{"total_commits":89,"total_committers":6,"mean_commits":"14.833333333333334","dds":0.4831460674157303,"last_synced_commit":"d158af6f146af0a17c85b87a719a9d67c8902830"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/shoenig/ssh-key-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fssh-key-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fssh-key-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fssh-key-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fssh-key-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shoenig","download_url":"https://codeload.github.com/shoenig/ssh-key-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoenig%2Fssh-key-sync/sbom","scorecard":{"id":820302,"data":{"date":"2025-08-11","repo":{"name":"github.com/shoenig/ssh-key-sync","commit":"d158af6f146af0a17c85b87a719a9d67c8902830"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/shoenig/ssh-key-sync/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/shoenig/ssh-key-sync/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/shoenig/ssh-key-sync/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/shoenig/ssh-key-sync/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/shoenig/ssh-key-sync/ci.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.7.3 not signed: https://api.github.com/repos/shoenig/ssh-key-sync/releases/180816691","Warn: release artifact v1.7.2 not signed: https://api.github.com/repos/shoenig/ssh-key-sync/releases/137495091","Warn: release artifact v1.7.1 not signed: https://api.github.com/repos/shoenig/ssh-key-sync/releases/95070918","Warn: release artifact v1.7.0 not signed: https://api.github.com/repos/shoenig/ssh-key-sync/releases/92149020","Warn: release artifact v1.6.0 not signed: https://api.github.com/repos/shoenig/ssh-key-sync/releases/86455556","Warn: release artifact v1.7.3 does not have provenance: https://api.github.com/repos/shoenig/ssh-key-sync/releases/180816691","Warn: release artifact v1.7.2 does not have provenance: https://api.github.com/repos/shoenig/ssh-key-sync/releases/137495091","Warn: release artifact v1.7.1 does not have provenance: https://api.github.com/repos/shoenig/ssh-key-sync/releases/95070918","Warn: release artifact v1.7.0 does not have provenance: https://api.github.com/repos/shoenig/ssh-key-sync/releases/92149020","Warn: release artifact v1.6.0 does not have provenance: https://api.github.com/repos/shoenig/ssh-key-sync/releases/86455556"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T15:20:24.149Z","repository_id":27611254,"created_at":"2025-08-23T15:20:24.149Z","updated_at":"2025-08-23T15:20:24.149Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31686244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","go","golang","ssh","ssh-key","ssh-key-manager","sync"],"created_at":"2024-10-28T20:58:28.446Z","updated_at":"2026-04-11T16:09:49.392Z","avatar_url":"https://github.com/shoenig.png","language":"Go","readme":"ssh-key-sync\n============\n\nCommand `ssh-key-sync` is a tool for managing `authorized_key` files, by synchronizing\nthe contents with public keys managed by accounts on [GitHub](https://docs.github.com/en/rest/users/keys).\n\n[![CI](https://github.com/shoenig/ssh-key-sync/actions/workflows/ci.yaml/badge.svg)](https://github.com/shoenig/ssh-key-sync/actions/workflows/ci.yaml)\n[![GitHub](https://img.shields.io/github/license/shoenig/ssh-key-sync.svg)](LICENSE)\n\n# Project Overview\n\nModule `github.com/shoenig/ssh-key-sync` provides the command `ssh-key-sync`.\n\n# Getting Started\n\nThe `ssh-key-sync` command can be downloaded from the [releases](https://github.com/shoenig/ssh-key-sync/releases) page.\n\nAlternatively, you can use Go directly.\n```shell\ngo install github.com/shoenig/ssh-key-sync@latest\n```\n\n#### Example Usage\n\nThere are a few arguments, but typically you should only need to specify `--github-user`.\nThe Linux user and `authorized_key` file are by default assumed to be of the user\nrunning the command.\n\n```shell\nssh-key-sync --github-user \u003cuser\u003e\n```\n\n#### Configuration\n\n```shell\nNAME:\n  ssh-key-sync\n\nUSAGE:\n  ssh-key-sync  [global options] [command [command options]] [arguments...]\n\nVERSION:\n  1.8.2\n\nDESCRIPTION:\n  Sync SSH public keys from GitHub to authorized_keys\n\nOPTIONS:\n--verbose/-v        boolean - print verbose logging\n--prune/-p          boolean - delete all keys not found in GitHub\n--system-user/-u     string - specify the unix system user\n--authorized-keys    string - override the output authorized_keys file\n--github-user/-g     string - specify the GitHub user\n--github-api         string - specify the GitHub API endpoint\n\nGLOBALS:\n--help/-h   boolean - print help message\n```\n\n# Install\n\nThe following steps should get `ssh-key-sync` running as a systemd-timer on any system with systemd.\nYou could also use cron or some other periodic task runner, but these instructions work with most major Linux distrobutions.\n\nThese examples use `linux` and `amd64` - be sure to use the correct version for your operating system and architecture.\n\n#### Download Archive\n\n```shell-session\n$ wget https://github.com/shoenig/ssh-key-sync/releases/download/v1.8.2/ssh-key-sync_1.8.2_linux_amd64.tar.gz\n```\n\n#### Extract Archive\n\n```shell-session\n$ sudo tar -C /usr/local/bin -xf ssh-key-sync_1.8.2_linux_amd64.tar.gz\n```\n\n#### Create `authorized_keys`\n\n```shell-session\n$ mkdir ~/.ssh \u0026\u0026 chmod 700 ~/.ssh\n$ touch ~/.ssh/authorized_keys \u0026\u0026 chmod 600 ~/.ssh/authorized_keys\n```\n\n#### Setup Systemd Timer\nA great way to keep your `authorized_key` file up-to-date is to run `ssh-key-sync` periodically via a systemd timer.\nTo set this up, we will need two files - one service file which represents execution of `ssh-key-sync`, \nand a timer file which represents the schedule on which the service should be executed. Use the example below, \nmodifying paths to suite your needs.\n\n##### The service file `/etc/systemd/system/ssh-key-sync.service`\n\n```\n[Unit]\nDescription=Synchronize ssh authorized keys with public keys from github.\n\n[Service]\nExecStart=/usr/local/bin/ssh-key-sync -verbose -system-user \u003cuser\u003e -github-user \u003cuser\u003e\n```\n\n##### The timer file `/etc/systemd/system/ssh-key-sync.timer`\n\n```\n[Unit]\nDescription=Run ssk-key-sync every 6 hours\n\n[Timer]\nOnBootSec=5min\nOnUnitActiveSec=6h\nUnit=ssh-key-sync.service\n\n[Install]\nWantedBy=timers.target\n```\n\n##### Enable the timer\n\n```shell-session\n$ sudo systemctl daemon-reload\n$ sudo systemctl enable ssh-key-sync.timer\n```\n\n#### See if it works\n\nThe timer will run in the background on its schedule, but it's nice to run the service immediately so we can\nsee that it is working correctly. To do that, just start the service.\n\n```shell-session\n$ sudo systemctl start ssh-key-sync.service\n```\n\nAnd now we can view the status to make sure it ran correctly.\n\n```shell-session\n$ sudo systemctl status ssh-key-sync\n```\n\nYou should see some output like, \n\n```logs\n○ ssh-key-sync.service - Synchronize ssh authorized keys with public keys from github.\n     Loaded: loaded (/etc/systemd/system/ssh-key-sync.service; static)\n     Active: inactive (dead) since Tue 2023-04-11 15:29:32 CDT; 2s ago\n   Duration: 236ms\nTriggeredBy: ○ ssh-key-sync.timer\n    Process: 2104 ExecStart=/usr/local/bin/ssh-key-sync -verbose -system-user shoenig -github-user shoenig (code=exited\u003e\n   Main PID: 2104 (code=exited, status=0/SUCCESS)\n        CPU: 22ms\n\nApr 11 15:29:32 localhost.localdomain systemd[1]: Started Synchronize ssh authorized keys with public keys from github..\nApr 11 15:29:32 localhost.localdomain ssh-key-sync[2104]: 2023/04/11 15:29:32 using default output authorized_keys file\u003e\nApr 11 15:29:32 localhost.localdomain ssh-key-sync[2104]: 2023/04/11 15:29:32 process local user shoenig from shoenig@g\u003e\nApr 11 15:29:32 localhost.localdomain ssh-key-sync[2104]: 2023/04/11 15:29:32 loaded 0 existing keys for user \"shoenig\"\nApr 11 15:29:32 localhost.localdomain ssh-key-sync[2104]: 2023/04/11 15:29:32 acquire github keys from \"https://api.git\u003e\nApr 11 15:29:32 localhost.localdomain ssh-key-sync[2104]: 2023/04/11 15:29:32 retrieved 10 keys for github user: shoenig\nApr 11 15:29:32 localhost.localdomain systemd[1]: ssh-key-sync.service: Deactivated successfully.\n```\n\nIt works! And inspecting the `~/.ssh/authorized_keys` file should reveal it contains your public keys from GitHub.\n\n# Contributing\n\nThe `github.com/shoenig/ssh-key-sync` tool is always improving with new features\nand error corrections. For contributing bug fixes and new features please file an issue.\n\n# License\n[MIT](https://raw.githubusercontent.com/shoenig/ssh-key-sync/master/LICENSE)\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoenig%2Fssh-key-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshoenig%2Fssh-key-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoenig%2Fssh-key-sync/lists"}