{"id":29922061,"url":"https://github.com/valohai/openssh-key","last_synced_at":"2025-08-02T08:45:03.732Z","repository":{"id":77174927,"uuid":"170322102","full_name":"valohai/openssh-key","owner":"valohai","description":"Tools to deal with OpenSSH2 (RFC4716) keys in Python","archived":false,"fork":false,"pushed_at":"2024-03-05T14:02:11.000Z","size":113,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-03-06T12:53:58.686Z","etag":null,"topics":["cryptography","keys","openssh","pki","python","ssh"],"latest_commit_sha":null,"homepage":"","language":"Python","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/valohai.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}},"created_at":"2019-02-12T13:23:31.000Z","updated_at":"2024-03-06T12:53:58.686Z","dependencies_parsed_at":null,"dependency_job_id":"73b0bd33-dd03-4aa4-8c55-33b53129c4ed","html_url":"https://github.com/valohai/openssh-key","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/valohai/openssh-key","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fopenssh-key","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fopenssh-key/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fopenssh-key/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fopenssh-key/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valohai","download_url":"https://codeload.github.com/valohai/openssh-key/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valohai%2Fopenssh-key/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268356088,"owners_count":24237380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cryptography","keys","openssh","pki","python","ssh"],"created_at":"2025-08-02T08:45:03.206Z","updated_at":"2025-08-02T08:45:03.692Z","avatar_url":"https://github.com/valohai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openssh_key\n\nTools to deal with OpenSSH2 (RFC4716) keys in as pure Python 3 as possible.\n\nThese key files are the default format generated by `ssh-keygen` since OpenSSH 7.8 (2018-08-24)\nand can be recognized from their `-----BEGIN OPENSSH PRIVATE KEY-----` header.\n\nIf you need to simply convert one of these files into the \"legacy\" PEM format, you can do it using\na recent enough `ssh-keygen` – or you can use this library. In case you just want the conversion done,\n\n```bash\nssh-keygen -e -m PEM -p -f my-openssh-format-private-key\n```\n\nwill transmute `my-openssh-format-private-key` in-place into PEM.\n\n## Limitations\n\n- Encrypted OpenSSH private key files are not yet supported, and raise an error.\n- Not all key formats supported by OpenSSH are supported; the widest support is for RSA keys.\n\n## Requirements\n\n- Python 3.7+\n\n## Usage\n\nInstall the package into your environment using your favored tools.\n\nIf you need to be able to convert key data into PEM, also install `cryptography`\n(or install this package with the `convert` extra, which depends on that module).\n\nThe basic API is provided via `openssh_key.OpenSSHKeyFile.parse_text()`, like so:\n\n```python\nfrom openssh_key import OpenSSHKeyFile\n\nwith open('my-openssh-format-private-key') as infp:\n    kf = OpenSSHKeyFile.parse_text(infp)\n\nfor keypair in kf.decrypt_keypairs():\n    print(keypair.public_key_string)  # as you'd find in `authorized_keys`\n\n```\n\nSee the modules themselves and the tests for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalohai%2Fopenssh-key","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalohai%2Fopenssh-key","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalohai%2Fopenssh-key/lists"}