| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 | .TH sshpk\-sign 1 "Jan 2016" sshpk "sshpk Commands".SH NAME.PPsshpk\-sign \- sign data using an SSH key.SH SYNOPSYS.PP\fB\fCsshpk\-sign\fR \-i KEYPATH [OPTION...].SH DESCRIPTION.PPTakes in arbitrary bytes, and signs them using an SSH private key. The key canbe of any type or format supported by the \fB\fCsshpk\fR library, including thestandard OpenSSH formats, as well as PEM PKCS#1 and PKCS#8..PPThe signature is printed out in Base64 encoding, unless the \fB\fC\-\-binary\fR or \fB\fC\-b\fRoption is given..SH EXAMPLES.PPSigning with default settings:.PP.RS.nf$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsaMEUCIAMdLS/vXrrtWFepwe....fi.RE.PPSigning in SSH (RFC 4253) format (rather than the default ASN.1):.PP.RS.nf$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \-t sshAAAAFGVjZHNhLXNoYTIt....fi.RE.PPSaving the binary signature to a file:.PP.RS.nf$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \\                            \-o signature.bin \-b$ cat signature.bin | base64MEUCIAMdLS/vXrrtWFepwe....fi.RE.SH OPTIONS.TP\fB\fC\-v, \-\-verbose\fRPrint extra information about the key and signature to stderr when signing..TP\fB\fC\-b, \-\-binary\fRDon't base64\-encode the signature before outputting it..TP\fB\fC\-i KEY, \-\-identity=KEY\fRSelect the key to be used for signing. \fB\fCKEY\fR must be a relative or absolutefilesystem path to the key file. Any format supported by the \fB\fCsshpk\fR libraryis supported, including OpenSSH formats and standard PEM PKCS..TP\fB\fC\-f PATH, \-\-file=PATH\fRInput file to sign instead of stdin..TP\fB\fC\-o PATH, \-\-out=PATH\fROutput file to save signature in instead of stdout..TP\fB\fC\-H HASH, \-\-hash=HASH\fRSet the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR,\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hashalgorithms may be used (e.g. ED25519 keys can only use SHA\-512)..TP\fB\fC\-t FORMAT, \-\-format=FORMAT\fRChoose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only forED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the formatused with TLS and typically the standard in most non\-SSH libraries (e.g.OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent..SH SEE ALSO.PP.BR sshpk-verify (1).SH BUGS.PPReport bugs at Github\[la]https://github.com/arekinath/node-sshpk/issues\[ra]
 |