|
NAMEsshpk-conv - convert between key formatsSYNOPSYSsshpk-conv -t FORMAT [FILENAME] [OPTIONS...]sshpk-conv -i [FILENAME] [OPTIONS...] DESCRIPTIONReads in a public or private key and converts it between different formats, particularly formats used in the SSH protocol and the well-known PEM PKCS#1/7 formats.In the second form, with the -i option given, identifies a key and prints to stderr information about its nature, size and fingerprint. EXAMPLESAssume the following SSH-format public key in id_ecdsa.pub:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTI...9M/4c4= user@host Identify it with -i: $ sshpk-conv -i id_ecdsa.pub id_ecdsa: a 256 bit ECDSA public key ECDSA curve: nistp256 Comment: user@host Fingerprint: SHA256:vCNX7eUkdvqqW0m4PoxQAZRv+CM4P4fS8+CbliAvS4k 81:ad:d5:57:e5:6f:7d:a2:93:79:56:af:d7:c0:38:51 Convert it to pkcs8 format, for use with e.g. OpenSSL: $ sshpk-conv -t pkcs8 id_ecdsa -----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAsA4R6N6AS3gzaPBeLjG2ObSgUsR zOt+kWJoijLnw3ZMYUKmAx+lD0I5XUxdrPcs1vH5f3cn9TvRvO9L0z/hzg== -----END PUBLIC KEY----- Retrieve the public half of a private key: $ openssl genrsa 2048 | sshpk-conv -t ssh -c foo@bar ssh-rsa AAAAB3NzaC1yc2EAAA...koK7 foo@bar Convert a private key to PKCS#1 (OpenSSL) format from a new-style OpenSSH key format (the ssh-keygen -o format): $ ssh-keygen -o -f foobar ... $ sshpk-conv -p -t pkcs1 foobar -----BEGIN RSA PRIVATE KEY----- MIIDpAIBAAKCAQEA6T/GYJndb1TRH3+NL.... -----END RSA PRIVATE KEY----- OPTIONS
-T FORMAT, --informat=FORMAT
FORMATSCurrently supported formats:
SEE ALSOssh-keygen(1), openssl(1)BUGSEncrypted (password-protected) keys are not supported.Report bugs at Github ⟨https://github.com/arekinath/node-sshpk/issues⟩
Visit the GSP FreeBSD Man Page Interface. |