An SSH host key is the server’s long-term identity key. When a client connects with SSH, it uses the host key to verify that the machine answering the session is the same server it has seen before. The public part is checked against the client’s known_hosts record, while the private part must stay protected on the server.
This matters because host keys help prevent man-in-the-middle attacks and accidental connections to a spoofed machine. If an attacker steals a host private key, they may impersonate the server to SSH clients and weaken trust in automated logins, backups, or admin tooling. If a key is replaced without explanation, clients will usually warn about a host identity change. Defenders should store host private keys securely, limit who can access them, and rotate them carefully when rebuilding systems or suspecting compromise. In kernel or process-escape incidents, host keys are valuable because they are trust anchors, not just files.


