.TH sshpk-verify 1 “Jan 2016” sshpk “sshpk Commands” .SH NAME .PP sshpk-verify - verify a signature on data using an SSH key .SH SYNOPSYS .PP fBfCsshpk-verifyfR -i KEYPATH -s SIGNATURE [OPTION…] .SH DESCRIPTION .PP Takes in arbitrary bytes and a Base64-encoded signature, and verifies that the signature was produced by the private half of the given SSH public key. .SH EXAMPLES .PP .RS .nf $ printf 'foo' | sshpk-verify -i ~/.ssh/id_ecdsa -s MEUCIQCYp… OK $ printf 'foo' | sshpk-verify -i ~/.ssh/id_ecdsa -s GARBAGE… NOT OK .fi .RE .SH EXIT STATUS .TP fBfC0fR Signature validates and matches the key. .TP fBfC1fR Signature is parseable and the correct length but does not match the key or otherwise is invalid. .TP fBfC2fR The signature or key could not be parsed. .TP fBfC3fR Invalid commandline options were supplied. .SH OPTIONS .TP fBfC-v, --verbosefR Print extra information about the key and signature to stderr when verifying. .TP fBfC-i KEY, --identity=KEYfR Select the key to be used for verification. fBfCKEYfR must be a relative or absolute filesystem path to the key file. Any format supported by the fBfCsshpkfR library is supported, including OpenSSH formats and standard PEM PKCS. .TP fBfC-s BASE64, --signature=BASE64fR Supplies the base64-encoded signature to be verified. .TP fBfC-f PATH, --file=PATHfR Input file to verify instead of stdin. .TP fBfC-H HASH, --hash=HASHfR Set the hash algorithm to be used for signing. This should be one of fBfCsha1fR, fBfCsha256fR or fBfCsha512fR&. Some key types may place restrictions on which hash algorithms may be used (e.g. ED25519 keys can only use SHA-512). .TP fBfC-t FORMAT, --format=FORMATfR Choose the signature format to use, from fBfCasn1fR, fBfCsshfR or fBfCrawfR (only for ED25519 signatures). The fBfCasn1fR format is the default, as it is the format used with TLS and typically the standard in most non-SSH libraries (e.g. OpenSSL). The fBfCsshfR format is used in the SSH protocol and by the ssh-agent. .SH SEE ALSO .PP .BR sshpk-sign (1) .SH BUGS .PP Report bugs at Github [la]https://github.com/arekinath/node-sshpk/issues[ra]