有没有人可以使用工具来区分 RSA 公钥和 DSA 公钥?我有两个 SSH .pub 文件,我需要知道它们是 RSA 还是 DSA。
问问题
6917 次
2 回答
1
如另一个答案中所述,由于文件是 SSH.COM 格式,您可以转换为 openssh 格式并打开文件以检查ssh-dsa
or ssh-rsa
:
To convert your SSH.COM key to OpenSSH format use:
ssh-keygen -i -f ssh_key.pub
From the ssh-keygen manpage
-i This option will read an unencrypted private (or public) key
file in SSH2-compatible format and print an OpenSSH
compatible private (or public) key to stdout. ssh-keygen
also reads the `SECSH Public Key File Format'. This option
allows importing keys from several commercial SSH
implementations.
-f Specifies the filename of the key file.
来源: http://landru.uwaterloo.ca/cgi-bin/wiki.pl?OpenSSH__-_ SSH.Com_Interoperability
于 2011-05-11T17:53:46.757 回答
0
您可以使用 ssh-keygen 获取指纹并从 .pub 文件中键入:
ssh-keygen -lf id_rsa.pub
于 2013-12-27T16:17:40.090 回答