To my understanding, ssh certificates are good for ,at least, two things: prevents a key sprawl and applies expirations. Instead of needing public keys for every user on the server, the server only needs one public key— the CA’s public key.
My question is: how is an individual user authenticated; how are particular permissions and roles authorized? If the CA public key authenticates the connection via a digital signature, and the server doesn’t store the public key— because after all that is the allure of an SSH certificate Authority, namely not storing a bunch of authorized keys— how does it know I am who I say I am and how does it apply the particular permissions to my session?
As Authentication of the client is concerned, It seems to me that even if I use ssh certificates the server must: first authenticate the clients public key by decrypting the digital signature with the CA public key. If it successfully decrypts then it is proven my key has been signed by the CA. Okay great. But what then. What does it do with my public key? If it isn’t stored in the authorized keys directory how does it know it’s me?
Simply, Does the ssh server store my public key? I cannot see how this would work otherwise. But if it does store it, then how would this not result in a key sprawl, which is what we’re trying to avoid?
Unless the server encrypts something with my public key after verifying the CA signature, and then sends it back for the client to decrypt. If it comes back decrypted this proves the client is in possession of the private key. And after this the server throws away the public key. Does it work like this?