大网数据广告活动
服务器运维问答

What is the maximum number of private keys you can use via SSH Agent (Pageant)

· 52CE 我爱测

While answering Re-using SSH keys I had a question of my own, is there a limit to the number of ssh keys you can hold in ssh agents? (and/or putty pageant). (as a test, I loaded 10 keys into my pageant and didn't seem to have an …

问题原文

原帖链接 · Jacob Evans · CC BY-SA 3.0

While answering Re-using SSH keys I had a question of my own, is there a limit to the number of ssh keys you can hold in ssh agents? (and/or putty pageant).

(as a test, I loaded 10 keys into my pageant and didn't seem to have an issue)

已采纳解答

原帖链接 · Jakuje · CC BY-SA 3.0

At last for the ssh-agent, the only limit is about the maximum memory available for the user or process. The keys are stored in the linked list which does not have any effective limit and all the constructs. The only counter used is int nentries;, which limits the effective amount of keys to 2 147 483 647, which is quite enough.

The limit is more in the practical usability. Once you load a lot of keys into the agent, they are send sequentially to the server (unless otherwise specially configured), which rejects after 3 or 6 public key tests (prevents the key enumeration for user). For some people, this can be also considered as a privacy issue, since the keys can be paired with, for example your github accounts.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-12-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。