如何知道 SSH key 的长度?
我的 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.
以前一切正常的地方。
与其猜测(或试错)哪个 key 是罪魁祸首,是否可以列出我所有的 SSH key 的长度?
更新:
git pull
给了我以上错误。即,我的公钥仍然可以:$ ssh -T git@salsa.debian.org
Welcome to GitLab, @myid-guest!
ssh-keygen -lf
可能不是答案,因为我正在关注 https://docs.gitlab.com/ee/ssh/ , 谁推荐使用ed25519
作为默认 key ,并且谁也指示,要生成新的 ED25519 SSH key 对,请执行 ssh-keygen -t ed25519 -C "email@example.com"
.但是,我的 ssh-keygen -lf
报告说$ ssh-keygen -lf id_ed25519.pub
256 SHA256:PO2bk6B...
推荐的 ED25519 SSH key 不太可能只有 256 位长。

最佳答案
你能试一下吗
ssh-keygen -lf keygen.pub
关于linux - 如何知道 SSH key 的长度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56827341/