{"id":1355,"date":"2024-04-27T19:21:20","date_gmt":"2024-04-27T16:21:20","guid":{"rendered":"https:\/\/geckich.site\/?p=1355"},"modified":"2024-04-27T19:21:22","modified_gmt":"2024-04-27T16:21:22","slug":"error-no-hostkey-alg-while-trying-to-connect-via-ssh-fix","status":"publish","type":"post","link":"https:\/\/geckich.space\/?p=1355","title":{"rendered":"Error &#8216;no hostkey alg&#8217; while trying to connect via ssh fix"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This error usually happens when old ssh client tries to connect to modern ssh server, with doesn&#8217;t support old RSA ciphers by default.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To fix this and be able to connect from old box, add to <strong>\/etc\/ssh\/sshd_config<\/strong> on the server side following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HostKeyAlgorithms +ssh-rsa\nPubkeyAcceptedKeyTypes +ssh-rsa<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It must be added before row:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Include \/etc\/ssh\/sshd_config.d\/*.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Otherwise, according to forums, it might not work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After adding options restart ssh daemon (you won&#8217;t lose your current connection):<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>systemctl restart sshd<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Links:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/unix.stackexchange.com\/questions\/679451\/sshd-no-hostkey-alg-fixed-but-still-confused\">https:\/\/unix.stackexchange.com\/questions\/679451\/sshd-no-hostkey-alg-fixed-but-still-confused<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This error usually happens when old ssh client tries to connect to modern ssh server, with doesn&#8217;t support old RSA ciphers by default. To fix this and be able to connect from old box, add to \/etc\/ssh\/sshd_config on the server side following: It must be added before row: Otherwise, according to forums, it might not &hellip; <a href=\"https:\/\/geckich.space\/?p=1355\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Error &#8216;no hostkey alg&#8217; while trying to connect via ssh fix<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10,7],"tags":[25,48,71,100],"class_list":["post-1355","post","type-post","status-publish","format-standard","hentry","category-linux","category-sysadmin","tag-console","tag-linux","tag-ssh","tag-100"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/posts\/1355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/geckich.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1355"}],"version-history":[{"count":1,"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/posts\/1355\/revisions"}],"predecessor-version":[{"id":1356,"href":"https:\/\/geckich.space\/index.php?rest_route=\/wp\/v2\/posts\/1355\/revisions\/1356"}],"wp:attachment":[{"href":"https:\/\/geckich.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geckich.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geckich.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}