source: trip-planner-front/node_modules/sshpk/man/man1/sshpk-conv.1@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.9 KB
Line 
1.TH sshpk\-conv 1 "Jan 2016" sshpk "sshpk Commands"
2.SH NAME
3.PP
4sshpk\-conv \- convert between key formats
5.SH SYNOPSYS
6.PP
7\fB\fCsshpk\-conv\fR \-t FORMAT [FILENAME] [OPTIONS...]
8.PP
9\fB\fCsshpk\-conv\fR \-i [FILENAME] [OPTIONS...]
10.SH DESCRIPTION
11.PP
12Reads in a public or private key and converts it between different formats,
13particularly formats used in the SSH protocol and the well\-known PEM PKCS#1/7
14formats.
15.PP
16In the second form, with the \fB\fC\-i\fR option given, identifies a key and prints to
17stderr information about its nature, size and fingerprint.
18.SH EXAMPLES
19.PP
20Assume the following SSH\-format public key in \fB\fCid_ecdsa.pub\fR:
21.PP
22.RS
23.nf
24ecdsa\-sha2\-nistp256 AAAAE2VjZHNhLXNoYTI...9M/4c4= user@host
25.fi
26.RE
27.PP
28Identify it with \fB\fC\-i\fR:
29.PP
30.RS
31.nf
32$ sshpk\-conv \-i id_ecdsa.pub
33id_ecdsa: a 256 bit ECDSA public key
34ECDSA curve: nistp256
35Comment: user@host
36Fingerprint:
37 SHA256:vCNX7eUkdvqqW0m4PoxQAZRv+CM4P4fS8+CbliAvS4k
38 81:ad:d5:57:e5:6f:7d:a2:93:79:56:af:d7:c0:38:51
39.fi
40.RE
41.PP
42Convert it to \fB\fCpkcs8\fR format, for use with e.g. OpenSSL:
43.PP
44.RS
45.nf
46$ sshpk\-conv \-t pkcs8 id_ecdsa
47\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-
48MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAsA4R6N6AS3gzaPBeLjG2ObSgUsR
49zOt+kWJoijLnw3ZMYUKmAx+lD0I5XUxdrPcs1vH5f3cn9TvRvO9L0z/hzg==
50\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
51.fi
52.RE
53.PP
54Retrieve the public half of a private key:
55.PP
56.RS
57.nf
58$ openssl genrsa 2048 | sshpk\-conv \-t ssh \-c foo@bar
59ssh\-rsa AAAAB3NzaC1yc2EAAA...koK7 foo@bar
60.fi
61.RE
62.PP
63Convert a private key to PKCS#1 (OpenSSL) format from a new\-style OpenSSH key
64format (the \fB\fCssh\-keygen \-o\fR format):
65.PP
66.RS
67.nf
68$ ssh\-keygen \-o \-f foobar
69\&...
70$ sshpk\-conv \-p \-t pkcs1 foobar
71\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\-
72MIIDpAIBAAKCAQEA6T/GYJndb1TRH3+NL....
73\-\-\-\-\-END RSA PRIVATE KEY\-\-\-\-\-
74.fi
75.RE
76.SH OPTIONS
77.TP
78\fB\fC\-i, \-\-identify\fR
79Instead of converting the key, output identifying information about it to
80stderr, including its type, size and fingerprints.
81.TP
82\fB\fC\-p, \-\-private\fR
83Treat the key as a private key instead of a public key (the default). If you
84supply \fB\fCsshpk\-conv\fR with a private key and do not give this option, it will
85extract only the public half of the key from it and work with that.
86.TP
87\fB\fC\-f PATH, \-\-file=PATH\fR
88Input file to take the key from instead of stdin. If a filename is supplied
89as a positional argument, it is equivalent to using this option.
90.TP
91\fB\fC\-o PATH, \-\-out=PATH\fR
92Output file name to use instead of stdout.
93.PP
94\fB\fC\-T FORMAT, \-\-informat=FORMAT\fR
95.TP
96\fB\fC\-t FORMAT, \-\-outformat=FORMAT\fR
97Selects the input and output formats to be used (see FORMATS, below).
98.TP
99\fB\fC\-c TEXT, \-\-comment=TEXT\fR
100Sets the key comment for the output file, if supported.
101.SH FORMATS
102.PP
103Currently supported formats:
104.TP
105\fB\fCpem, pkcs1\fR
106The standard PEM format used by older OpenSSH and most TLS libraries such as
107OpenSSL. The classic \fB\fCid_rsa\fR file is usually in this format. It is an ASN.1
108encoded structure, base64\-encoded and placed between PEM headers.
109.TP
110\fB\fCssh\fR
111The SSH public key text format (the format of an \fB\fCid_rsa.pub\fR file). A single
112line, containing 3 space separated parts: the key type, key body and optional
113key comment.
114.TP
115\fB\fCpkcs8\fR
116A newer PEM format, usually used only for public keys by TLS libraries such
117as OpenSSL. The ASN.1 structure is more generic than that of \fB\fCpkcs1\fR\&.
118.TP
119\fB\fCopenssh\fR
120The new \fB\fCssh\-keygen \-o\fR format from OpenSSH. This can be mistaken for a PEM
121encoding but is actually an OpenSSH internal format.
122.TP
123\fB\fCrfc4253\fR
124The internal binary format of keys when sent over the wire in the SSH
125protocol. This is also the format that the \fB\fCssh\-agent\fR uses in its protocol.
126.SH SEE ALSO
127.PP
128.BR ssh-keygen (1),
129.BR openssl (1)
130.SH BUGS
131.PP
132Encrypted (password\-protected) keys are not supported.
133.PP
134Report bugs at Github
135\[la]https://github.com/arekinath/node-sshpk/issues\[ra]
Note: See TracBrowser for help on using the repository browser.