ssh认证输出含义:类型1

ssh认证输出含义:类型1

我尝试使用私钥通过 ssh 连接到远程服务器,我看到输出的一部分:

debug1: identity file /home/gigi/.ssh/id_rsa type 1

这是什么type 1意思?

答案1

(open)ssh 客户端有几个列表关键类型:

/* Key types */
enum sshkey_types {
    KEY_RSA,
    KEY_DSA,
    KEY_ECDSA,
    KEY_ED25519,
    KEY_RSA_CERT,
    KEY_DSA_CERT,
    KEY_ECDSA_CERT,
    KEY_ED25519_CERT,
    KEY_XMSS,
    KEY_XMSS_CERT,
    KEY_UNSPEC
};

这些类型在sshkey.c代码设置keytypes结构时;它们是type该结构中的值。要获取相应的名称,请从上述序列中获取键类型,使用其值(从 1 开始)并找到相应的nameshortname。手动对它们进行插值(并按 排序type)给出下表,其中包含键名称、短名称和类型:

NULL, NULL, -1
rsa-sha2-256, RSA, 1
rsa-sha2-512, RSA, 1
ssh-rsa, RSA, 1
ssh-dss, DSA, 2
ecdsa-sha2-nistp256, ECDSA, 3
ecdsa-sha2-nistp384, ECDSA, 3
ecdsa-sha2-nistp521, ECDSA, 3
ssh-ed25519, ED25519, 4
[email protected], RSA-CERT, 5
[email protected], RSA-CERT, 5
[email protected], RSA-CERT, 5
[email protected], DSA-CERT, 6
[email protected], ECDSA-CERT, 7
[email protected], ECDSA-CERT, 7
[email protected], ECDSA-CERT, 7
[email protected], ED25519-CERT, 8
[email protected], XMSS, 9
[email protected], XMSS-CERT, 10

相关内容