With 8,061 keys (Mine is at the end of the file)
real 0m0.442s
real 0m0.447s
real 0m0.458s
With just a single key:
real 0m0.248s
real 0m0.264s
real 0m0.255s
表现比我想象的要好得多。对于可能更高效的大量密钥(50,000+)的任何替代方案,我仍然非常感兴趣。
With 8,061 keys (Mine is at the end of the file)
real 0m0.442s
real 0m0.447s
real 0m0.458s
With just a single key:
real 0m0.248s
real 0m0.264s
real 0m0.255s
表现比我想象的要好得多。对于可能更高效的大量密钥(50,000+)的任何替代方案,我仍然非常感兴趣。
authorized_keys文件只有大约25MB大小。可以肯定地说,这个文件会完全被缓存到文件系统缓冲区中。我想,在文件中找到密钥所需的时间将远远小于使用该密钥对用户进行身份验证所需的时间。 - cjc