I'm developing a solution which inserts a big number of SSH-keys into the authorized keys files of my SSH-server. Does anyone know the limit of keys that you can insert into that file? Are we talking about a hundred, thousand or tens of thousands? Any idea? And how is the performance affected when you have a large number of keys?
I suppose it is preferable to divide keys between various users, but I would like to know the limits of one user.
There is no limit to the number of entries in the file. From the source code
As you can see this simply loops over the file until read_keyfile_line returns -1.
There is no limit, but finding the correct key will be slow, like GREPing a large text file.