【问题标题】:DSA vs RSA: how can you tellDSA 与 RSA:你怎么知道
【发布时间】:2011-08-23 12:41:44
【问题描述】:

是否有人可以使用工具来区分 RSA 公钥和 DSA 公钥?我有两个 SSH .pub 文件,我需要知道它们是 RSA 还是 DSA。

【问题讨论】:

    标签: ssh ssh-keys openssh


    【解决方案1】:

    您可以使用 ssh-keygen 获取指纹并从 .pub 文件中键入:

    ssh-keygen -lf id_rsa.pub
    

    【讨论】:

      【解决方案2】:

      如另一个答案所述,由于该文件为 SSH.COM 格式,您可以转换为 openssh 格式并打开文件以检查 ssh-dsassh-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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-08-18
        • 1970-01-01
        • 2018-08-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-12-04
        相关资源
        最近更新 更多