sshpk-sign (1) Linux Manual Page
NAME
sshpk-sign – sign data using an SSH key
SYNOPSYS
sshpk-sign -i KEYPATH [OPTION…]
DESCRIPTION
Takes in arbitrary bytes, and signs them using an SSH private key. The key can be of any type or format supported by the sshpk library, including the standard OpenSSH formats, as well as PEM PKCS#1 and PKCS#8.
The signature is printed out in Base64 encoding, unless the –binary or -b option is given.
EXAMPLES
Signing with default settings:
-
$ printf 'foo' | sshpk-sign -i ~/.ssh/id_ecdsa MEUCIAMdLS/vXrrtWFepwe...
Signing in SSH (RFC 4253) format (rather than the default ASN.1):
-
$ printf 'foo' | sshpk-sign -i ~/.ssh/id_ecdsa -t ssh AAAAFGVjZHNhLXNoYTIt...
Saving the binary signature to a file:
-
$ printf 'foo' | sshpk-sign -i ~/.ssh/id_ecdsa \ -o signature.bin -b $ cat signature.bin | base64 MEUCIAMdLS/vXrrtWFepwe...
OPTIONS
-v, –verbose
-b, –binary
-i KEY, –identity=KEY
KEY must be a relative or absolute
sshpk library
-f PATH, –file=PATH
-o PATH, –out=PATH
-H HASH, –hash=HASH
sha1,
sha256 or sha512. Some key types may place restrictions on which hash
-t FORMAT, –format=FORMAT
asn1, ssh or raw (only for
asn1 format is the default, as it is the format
ssh format is used in the SSH protocol and by the ssh-agent.
SEE ALSO
sshpk-verify(1)
BUGS
Report bugs at Github https://github.com/arekinath/node-sshpk/issues
