Validate Public And Private Key

[Solved] Validate Public And Private Key | Shell - Code Explorer | yomemimo.com
Question : validate public and private key

Answered by : jason-m-potter

# Comparing SSH Private & Public Keys
$ ssh-keygen -l -f id_rsa
2048 SHA256:SIGNATURE [email protected] (RSA)
$ ssh-keygen -l -f id_rsa.pub
2048 SHA256:SIGNATURE [email protected] (RSA)
# Compare SIGNATURES to validate matching key pairs.
# CAUTION improper usage of ssh-keygen will overwrite your files.

Source : https://support.cpanel.net/hc/en-us/articles/360056952833-How-to-verify-if-a-public-and-private-RSA-SSH-key-match- | Last Update : Tue, 11 Oct 22

Answers related to validate public and private key

Code Explorer Popular Question For Shell