One of the authentication methods in SSH involves the client signing a message with its private key and sending it to the server for verification.
RFC 4252 (page 9) says:
The value of 'signature' is a signature by the corresponding private
key over the following data, in the following order:
string session identifier
string user name
string service name
string public key algorithm name
string public key to be used for authentication
The same RFC (page 8) says that all the above information other than the session identifier is passed to the server along with the signature. To verify the signature then, the server would have to recontruct the message (adding the session identifier) and then pass it on to the signature verification algorithm, alongside the received signature and public key.
Is this what happens?