Jump to content

How to check if an RSA public / private key pair match


dil_bert

Recommended Posts


I have two files, id_rsa and id_rsa.pub. What command can be used to validate if they are a valid pair?

i have tested this way:

ssh-keygen -y -e -f <private key>


[martin@martin-pc ~]$ ssh-keygen -y -e -f <private key>
bash: Syntaxfehler beim unerwarteten Wort `newline'
[martin@martin-pc ~]$

why do i get this error ?!

Link to comment
Share on other sites

I can only assume the problem is that you don't know what "unexpected token" means. Frankly, I'm not sure what it's doing there either.

ssh-keygen -ye with the private key will tell you the public key. Compare the output with your actual public key to see if they match.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.