python-sshkey
About
SSH key management utility
Supported Key Algorithms
RSA
DSA
ECDSA
Supported Key Formats
OpenSSH (marshal / unmarshal)
SSH2 (RFC 4716) (marshal only)
Supported Python Versions
Python 3.6+
Install
$ pip install sshkey
Or
$ python setup.py install
Examples
>>> from sshkey.public import (
... SSHKeyType,
... from_openssh,
... )
>>>
>>> key = from_openssh('ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4gMyv02ZZ3W4gKz5VyojiEGCWb1M/wOwpA1CrJiBEaIqgghq9PiT7sfjNzRnwnEKiGh0T31YpmxSC+OyEZLylWIlsdwer84MfIGvo1LA+vnljnMxyLpTZCXbK0tWqIlnjeyTzGMBNuPaq6j1b1Zvyhma1FyovZHIjiCQmpSN2Xu8o4Pq1/cgmDF9T1MKZ3zMJoTg1EjCVtl5OmxFsoXytl69Qreiy21X5Nztpr8eSlLj+0RPl9vbj9lg9ljj/wHuHeiUjHFSDz0YD8Hg01wGITkGyoBhawQLlOprjgtZX7P9TWo+1c9ogeACgTkfV5W3+mytRg2AAgIiY0uiOCzzR yosida95')
>>>
>>> key.type is SSHKeyType.RSA
True
>>>
>>> key.length
2048
>>>
>>> print(key.fingerprint())
d8fef487004e3cb50a9188f9a0f267e4
>>>
>>> print(key.pretty_finger_print())
d8:fe:f4:87:00:4e:3c:b5:0a:91:88:f9:a0:f2:67:e4
>>>
>>> print(key.to_openssh())
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4gMyv02ZZ3W4gKz5VyojiEGCWb1M/wOwpA1CrJiBEaIqgghq9PiT7sfjNzRnwnEKiGh0T31YpmxSC+OyEZLylWIlsdwer84MfIGvo1LA+vnljnMxyLpTZCXbK0tWqIlnjeyTzGMBNuPaq6j1b1Zvyhma1FyovZHIjiCQmpSN2Xu8o4Pq1/cgmDF9T1MKZ3zMJoTg1EjCVtl5OmxFsoXytl69Qreiy21X5Nztpr8eSlLj+0RPl9vbj9lg9ljj/wHuHeiUjHFSDz0YD8Hg01wGITkGyoBhawQLlOprjgtZX7P9TWo+1c9ogeACgTkfV5W3+mytRg2AAgIiY0uiOCzzR yosida95
>>>
>>> print(key.to_ssh2())
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "2048-bit RSA, yosida95"
AAAAB3NzaC1yc2EAAAADAQABAAABAQC4gMyv02ZZ3W4gKz5VyojiEGCWb1M/wOwpA1CrJi
BEaIqgghq9PiT7sfjNzRnwnEKiGh0T31YpmxSC+OyEZLylWIlsdwer84MfIGvo1LA+vnlj
nMxyLpTZCXbK0tWqIlnjeyTzGMBNuPaq6j1b1Zvyhma1FyovZHIjiCQmpSN2Xu8o4Pq1/c
gmDF9T1MKZ3zMJoTg1EjCVtl5OmxFsoXytl69Qreiy21X5Nztpr8eSlLj+0RPl9vbj9lg9
ljj/wHuHeiUjHFSDz0YD8Hg01wGITkGyoBhawQLlOprjgtZX7P9TWo+1c9ogeACgTkfV5W
3+mytRg2AAgIiY0uiOCzzR
---- END SSH2 PUBLIC KEY ----
>>>
>>> type(key)
<class 'sshkey.public.SSHRSAPublicKey'>
>>>
>>> # Following attributes are available only in `SSHRSAPublicKey`
>>>
>>> key.exponent
65537
>>>
>>> key.modulus
23291361542927526870238657678067236666316634620810120720724799104986752124451659237538147602906450056165165321026453613037422557467367017856171302126254302704561406213684511746522521489098611738674943205317768217444134584525624522689946036426068313269096975514451460214534135120728058539927308903627028117754275189409047243801833683615404857777545626661864188152310484892490356842310296868070586920606890495126519733008950333118463353021953838288379618513638818227222090588352593178733827277689594803980347760492947535017886827810037837197078021077627828242222273041463930547575709340614552834704309059536918401465553
License
python-sshkey is licensed under the 3-Clause BSD License. See ./LICENSE.
Metadata
Release files for sshkey 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sshkey-0.1.0.tar.gz | 5.2 kB | Without provenance | Details for sshkey-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sshkey-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sshkey-0.1.0-py3-none-any.whl |
Total release size: 11.6 kB
Release files / sshkey-0.1.0.tar.gz
| Download URL | sshkey-0.1.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21724a7ae34b8406f69fad83122bb6c7bc6da152a2973d171f1aa8884e6ec777
|
|
BLAKE2b-256 checksum How to use checksums |
606927dc1aafa5ec9a4e8990729bf860545d5c7da36a79c0bb0d5af9af3814b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.5
|
Release files / sshkey-0.1.0-py3-none-any.whl
| Download URL | sshkey-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a30594b8a301a83d45890a14e515f9fd3f4df587ee22c06a75d39d011703f924
|
|
BLAKE2b-256 checksum How to use checksums |
c9910ea145e0751effde04083741b8e3fe004b06f29fcefce3a9227d5fb51ca5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.5
|
Security for sshkey 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.