Software⏱️ 3 min read📅 2026-06-11

How to Fix: PuTTY Fatal error: Couldn't agree on host key algorithm

SEO meta description 140-155 characters.

Quick Answer: 1-2 sentences of direct conversational advice.

PuTTY Fatal error: Couldn't agree on host key algorithm occurs when the server and client have different accepted algorithms for host keys. This error can be frustrating as it prevents users from connecting to the server.

This error is typically caused by a mismatch between the algorithms accepted by the server and the client. In this case, the server offers rsa-sha2-512, rsa-sha2-256, and ecdsa-sha2-nistp256 algorithms for host keys, while the client only accepts ssh-ed25519, ssh-ed25519-cert-v01@openssh.com, ssh-rsa, ssh-dss, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, and ecdsa-sha2-nistp521 algorithms.

⚠️ Common Causes

  • The primary reason for this error is the mismatch between the server's accepted host key algorithms and the client's accepted algorithms. This can be caused by a variety of factors, including outdated software or incorrect configuration settings.
  • An alternative cause could be a misconfigured SSH server that does not offer the required algorithms.

✅ Best Solutions to Fix It

Updating PuTTY to use compatible algorithms

  1. Step 1: Open PuTTY and go to Connection > Options > SSH interface. Select 'Use the controlmaster option' and then select 'Use only protocol 2'. This will ensure that PuTTY uses compatible algorithms with the server.
  2. Step 2: Select the 'Advanced' option next to the connection profile and click on 'Edit'. In the 'SSH settings' tab, add a new key in the 'Host keys' section. Select 'Import existing key file' and choose the private key generated by the server. This will allow PuTTY to use the same host key algorithm as the server.
  3. Step 3: Save the changes and try connecting to the server again.

Configuring the SSH server to offer compatible algorithms

  1. Step 1: Contact the system administrator of the server and ask them to update the SSH server configuration to offer the required host key algorithms. This can be done by editing the sshd_config file and adding or modifying the 'HostKeyAlgorithms' option.
  2. Step 2: The 'HostKeyAlgorithms' option should be set to include rsa-sha2-512, rsa-sha2-256, and ecdsa-sha2-nistp256. This will ensure that the server offers compatible algorithms for host keys.

💡 Conclusion

To resolve the PuTTY Fatal error: Couldn't agree on host key algorithm, update PuTTY to use compatible algorithms or configure the SSH server to offer the required host key algorithms.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions