{"id":683,"date":"2023-04-13T07:08:42","date_gmt":"2023-04-13T07:08:42","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2023\/04\/13\/7266279-how-to-fix-the-host-key-verification-failed-error\/"},"modified":"2026-12-01T08:44:55","modified_gmt":"2026-12-01T08:44:55","slug":"7266279-how-to-fix-the-host-key-verification-failed-error","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/7266279-how-to-fix-the-host-key-verification-failed-error\/","title":{"rendered":"How to fix the &#8220;Host key verification failed&#8221; error at Hostinger"},"content":{"rendered":"<p>To fix the \u201cHost key verification failed\u201d error at Hostinger, remove the outdated server key from your local <code>known_hosts<\/code> file with <code>ssh-keygen -R<\/code>, or delete the entry manually, then reconnect. The error occurs when the identification key (fingerprint) of the remote server has changed since your last connection, and SSH blocks the connection to protect you from \u201cman-in-the-middle\u201d attacks.<\/p>\n<h2 id=\"h-the-quick-fix-using-the-ssh-keygen-command\">The quick fix: Using the ssh-keygen command<\/h2>\n<p>The most efficient way to fix this error is to use the ssh-keygen tool to remove the outdated key for a specific IP address or domain.<\/p>\n<ol>\n<li>Open your terminal (macOS\/Linux) or PowerShell (Windows).<\/li>\n<li>Run the following command, replacing [IP_ADDRESS] with your server&#8217;s IP:\n<pre>ssh-keygen -R [IP_ADDRESS]<\/pre>\n<p>Make sure to replace <b>[vps-ip]<\/b> with <b><a data-click-id=\"hgr-post-content-link-the-ip-of-your-vps\" class=\"intercom-content-link\" href=\"\/support\/5139756-how-to-find-your-vps-ip-address-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">the IP of your VPS<\/a><\/b>. This will create a backup copy of the <b>known_hosts<\/b> file and delete the host key entry associated with your VPS IP.<\/li>\n<li>The output will confirm that the known_hosts file has been updated. You can now try reconnecting.<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-10450\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-34.png\/public\" alt=\"\" width=\"1027\" height=\"264\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-34.png\/w=1027,fit=scale-down 1027w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-34.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-34.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-34.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1027px) 100vw, 1027px\" \/><\/p>\n<h2 id=\"h-the-manual-fix-editing-the-known_hosts-file\">The manual fix: Editing the known_hosts file<\/h2>\n<p>If the command above does not work, you can manually open and edit the storage file to remove the offending fingerprint.<\/p>\n<ol>\n<li>Locate your known_hosts file:\n<ul>\n<li>Linux\/macOS:\n<pre>~\/.ssh\/known_hosts<\/pre>\n<\/li>\n<li>Windows:\n<pre>C:\\Users\\YourUsername\\.ssh\\known_hosts<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>Open the file with a plain text editor (like Notepad or Nano).<\/li>\n<li>Find and delete the entire line that starts with your server&#8217;s IP address or hostname.<\/li>\n<li>Save the file and try <b><a data-click-id=\"hgr-post-content-link-connecting-to-your-vps-again-using-ssh\" class=\"intercom-content-link\" href=\"\/support\/5723772-how-to-connect-to-your-vps-via-ssh-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">connecting to your VPS again using SSH<\/a>.<\/b><\/li>\n<\/ol>\n<h2 id=\"h-the-ignore-fix-troubleshooting-only\">The &#8220;Ignore&#8221; fix (Troubleshooting only)<\/h2>\n<p>You can tell SSH to skip the strict key checking temporarily. Use this method only for debugging in a controlled environment.<\/p>\n<pre>ssh -o StrictHostKeyChecking=no username@ip_address<\/pre>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-10451\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-35.png\/public\" alt=\"\" width=\"1161\" height=\"530\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-35.png\/w=1161,fit=scale-down 1161w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-35.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-35.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-11_18-35.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1161px) 100vw, 1161px\" \/><\/p>\n<p class=\"no-margin\">If you are still unable to connect after following the steps above, you can try the following:<\/p>\n<ul>\n<li>\n<p class=\"no-margin\">Verify that you are connecting to the correct IP address (or hostname)<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Ensure that your firewall is not blocking the connection<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Restart your local device or the VPS to reset the network settings<\/p>\n<\/li>\n<\/ul>\n<p>The &#8220;Host key verification failed&#8221; error is a common part of VPS management, especially after re-installing an OS or changing server IPs. By using the ssh-keygen -R command, you can quickly refresh your local computer\u2019s security records and re-establish a secure connection to your Hostinger VPS.<\/p>\n<p><b>NOTES<\/b><\/p>\n<ul>\n<li><strong>Gradual Rollout:<\/strong> This security feature is universal to all SSH connections.<\/li>\n<li><strong>Root Access<\/strong>: These fixes are applied on your local computer, so you do not need root access on the remote server to perform them.<\/li>\n<li><strong>Multiple Entries<\/strong>: If you connect to the same server via both IP and a domain name, you may need to run the ssh-keygen -R command for both addresses.<\/li>\n<li><strong>Hosting plans<\/strong>: If you connect to a Hostinger hosting plan, check the current host key fingerprints on the <a data-click-id=\"hgr-post-content-link-ssh-access\" href=\"\/support\/1583245-how-to-connect-to-a-hosting-plan-via-ssh-in-hostinger\/\"><strong>SSH Access<\/strong><\/a> page in Hostinger dashboard, and confirm that the fingerprint shown when you reconnect matches.<\/li>\n<li><strong>cPanel hosting<\/strong>: In December 2026, the SSH host key on port 65002 changed on all Hostinger cPanel servers as part of a security update. The warning is expected when you connect with OpenSSH-based tools such as <code>ssh<\/code>, <code>scp<\/code>, <code>sftp<\/code>, rsync, Git, or VS Code Remote. Your websites and email aren&#8217;t affected. Before you remove the old key, contact Hostinger support with your server name and the <code>SHA256:<\/code> fingerprint from the warning to confirm it&#8217;s genuine. Then run <code>ssh-keygen -R \"[server-hostname]:65002\"<\/code> and reconnect. For CI\/CD deployments, update the stored <code>known_hosts<\/code> entry.<\/li>\n<li>See <a data-click-id=\"hgr-post-content-link-how-to-troubleshoot-ssh-connection-issues-on-vps\" href=\"\/support\/9969102-how-to-troubleshoot-ssh-connection-issues-on-vps\/\">how to troubleshoot SSH connection issues on VPS<\/a> for more general SSH troubleshooting.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to resolve SSH connection errors by updating or removing outdated server fingerprints from your local machine.<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_content_updated_date":"","include_on_kodee":true,"footnotes":""},"categories":[199],"tags":[],"class_list":["post-683","post","type-post","status-publish","format-standard","hentry","category-vps-management"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/7266279-how-to-fix-the-host-key-verification-failed-error","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/7266279-como-solucionar-el-error-host-key-verification-failed","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/7266279-comment-reparer-l-erreur-host-key-verification-failed","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/7266279-cara-memperbaiki-error-host-key-verification-failed","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/support\/7266279-como-corrigir-o-erro-host-key-verification-failed","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=683"}],"version-history":[{"count":8,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/683\/revisions"}],"predecessor-version":[{"id":26488,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/683\/revisions\/26488"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}