{"id":6021,"date":"2025-10-21T13:09:06","date_gmt":"2025-10-21T18:09:06","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=6021"},"modified":"2025-10-21T13:09:26","modified_gmt":"2025-10-21T18:09:26","slug":"bad-server-host-key-invalid-key-length","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/bad-server-host-key-invalid-key-length\/","title":{"rendered":"Bad server host key: Invalid key length"},"content":{"rendered":"\n<p>You may encounter the following error when SSHing to legacy systems.<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">Bad server host key: Invalid key length<\/code><\/pre>\n\n\n\n<p>This happens due to older devices not using a larger key size.<\/p>\n\n\n\n<p>A work around is to add an exception in your SSH config file allowing a smaller key size for specific hosts.<\/p>\n\n\n\n<p>You can do this by adding the following to your <code>~\/.ssh\/config<\/code> file.  Change the IP addresses to the hosts you are trying to connect to.  You can add more IPs if needed.  Just ensure there is a space between them.<\/p>\n\n\n\n<pre class=\"wp-block-code has-dark-gray-background-color has-background\"><code class=\"\">Host 192.168.1.20 192.168.1.1\n     RSAMinSize 1024<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You may encounter the following error when SSHing to legacy systems. This happens due to older devices not using a larger key size. A work around is to add an exception in your SSH config file allowing a smaller key &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/bad-server-host-key-invalid-key-length\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,129,1144],"tags":[1735,501,827,221],"class_list":["post-6021","post","type-post","status-publish","format-standard","hentry","category-command-line","category-linux","category-ubiquiti","category-ubiquiti-command-line","tag-1735","tag-config","tag-key","tag-ssh"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/6021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=6021"}],"version-history":[{"count":2,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/6021\/revisions"}],"predecessor-version":[{"id":6023,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/6021\/revisions\/6023"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=6021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=6021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=6021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}