Question about SSH host key algorithms I'm currently writing a report for my Master's degree on the SSH protocol. Quite interesting!
However I'm having trouble getting into the inner workings of the host key algorithms.
For example, according to RFC4253, &quot;ssh-rsa&quot; is a key format where the server generates an RSA keypair. So far, so good. However, I don't seem to understand where SHA-1 comes into the play.
RFC8332 says

&quot;SSH originally defined the public key algorithms &quot;ssh-rsa&quot; for server and client authentication using RSA with SHA-1&quot;.

My understanding is that the server computes a hash of the public key using SHA-1 and when appropriate, sends both the public key part and its SHA-1 computed hash with to the client.
Am I correct?
This isn't in any way related to the fingerprint shown when we connect to an SSH server for the first time, is it? If not, how can I calculate it (without ssh-keygen)?
Many thanks!
The principle of SSH is to implement secure (i.e. confidential and authenticated) communication channels in a client–server session. The new release of SSH (known as SSH2) uses public-key infrastructures in order to authenticate servers. This is typically heavy stuff, but the user can easily bypass it: he just has to click “OK” anytime there is a ,security warning.

SSH2 uses DSS for server authentication and Diffie-Hellman key agreement for setting
up a symmetric session key (previous versions were entirely based on RSA). Both
are based on some generator g which generates a subgroup of Z∗
p of prime order q.


The client picks a random ${x ∈ \{1,..., q − 1\}}$, computes ${e = g^x mod p}$, and
sends it to the server.




The server picks a random ${y ∈ \{1,..., q − 1\}}$, computes ${f = g^y mod
p}$ and ${K = e^y mod p}$.


Now server computes the Hash H using various other values and signs it, ${s=sig(H)}$.where ${K_S}$ is his public key, and sends
${K_S}$, f , and the signature s to the client.  This H could be generated from SHA-1.
Now, When you connect to a machine for the first time you will be told that the authenticity can't be established and presented with a key fingerprint to check.
This fingerprint is generated from the server public key may be SHA1 or SHA256.
you can use:-  $ ssh-keygen   -lf   ~/.ssh/id_rsa.pub