【发布时间】:2019-11-11 14:50:47
【问题描述】:
如何知道 SSH 密钥的长度?
最近我的git pull 收到以下错误,
$ git pull
> GitLab: Your SSH key must be at least 2048 bits.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
以前一切正常的地方。
与其猜测(或试错)哪个密钥是罪魁祸首,是否可以列出我所有的 SSH 密钥的长度?
更新:
-
只有
git pull给了我上述错误。即,我的公钥仍然可以:$ ssh -T git@salsa.debian.org Welcome to GitLab, @myid-guest! -
ssh-keygen -lf可能不是答案,因为我正在关注 https://docs.gitlab.com/ee/ssh/,他建议使用ed25519作为默认密钥,并且还指示要生成新的 ED25519 SSH 密钥对,请执行 @ 987654329@。但是,我的ssh-keygen -lf报告说$ ssh-keygen -lf id_ed25519.pub 256 SHA256:PO2bk6B...
推荐的 ED25519 SSH 密钥不太可能只有 256 位长。

【问题讨论】:
-
1.列出所有密钥及其大小:unix.stackexchange.com/questions/2116/… 2. 这是 ED25519 密钥的正确大小,公钥长度为 256 位,签名是该大小的两倍。
标签: linux ubuntu key ssh-keys openssh