是否有人使用工具来区分RSA公钥和DSA公钥?我有两个SSH .pub文件,我需要知道它们是RSA还是DSA。
答案 0 :(得分:1)
如另一个答案所述,由于该文件是SSH.COM格式,您可以转换为openssh格式,只需打开该文件即可检查ssh-dsa
或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
答案 1 :(得分:0)
您可以使用ssh-keygen获取指纹并输出.pub文件:
ssh-keygen -lf id_rsa.pub