How do you test a public/private DSA keypair?

后端 未结 11 1191
日久生厌
日久生厌 2020-12-12 08:35

Is there an easy way to verify that a given private key matches a given public key? I have a few *.puband a few *.key files, and I need to check w

11条回答
  •  半阙折子戏
    2020-12-12 09:29

    The check can be made easier with diff:

    diff <(ssh-keygen -y -f ) 
    

    The only odd thing is that diff says nothing if the files are the same, so you'll only be told if the public and private don't match.

提交回复
热议问题