{"id":3771,"date":"2020-12-08T23:39:45","date_gmt":"2020-12-08T15:39:45","guid":{"rendered":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/?p=3771"},"modified":"2020-12-08T23:43:22","modified_gmt":"2020-12-08T15:43:22","slug":"vagrant-ssh-login-failed","status":"publish","type":"post","link":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/2020\/12\/vagrant-ssh-login-failed\/","title":{"rendered":"\u76f4\u63a5\u7528 SSH \u767b\u5165 vagrant \u865b\u64ec\u6a5f\u5931\u6557"},"content":{"rendered":"\n<p>\u8a66\u8457\u76f4\u63a5\u4f7f\u7528 SSH \u767b\u5165 vagrant \u958b\u51fa\u4f86\u7684 Ubuntu \u865b\u64ec\u6a5f\uff0c\u6703\u51fa\u73fe\u932f\u8aa4\u8a0a\u606f\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>SSH Login Failed : Permission denied (publickey,gssapi-keyex,gssapi-with-mic)<\/p><\/blockquote>\n\n\n\n<p>\u53ef\u662f\u7528 vagrant ssh \u537b\u53ef\u4ee5\u767b\u5165\uff0c\u7528 vagrant ssh \u767b\u5165\u9032\u53bb\u67e5\uff0cSSH daemon \u6709\u555f\u52d5\uff0c\u6240\u4ee5 SSH \u670d\u52d9\u662f\u6c92\u554f\u984c\u7684\u3002\u5f8c\u4f86\u900f\u904e\u932f\u8aa4\u8a0a\u606f\u624d\u67e5\u5230\uff0c\u662f SSH Daemon \u88e1\u7684 PasswordAuthentication \u88ab\u8a2d\u5b9a\u70ba no \u4e86\u3002\u6240\u4ee5\u4fee\u6539 \/etc\/ssh\/sshd_config \uff0c\u5c07 PasswordAuthentication \u8a2d\u5b9a\u70ba yes \u5f8c\uff0c\u5c31\u53ef\u4ee5\u7528 ssh \u767b\u5165\u4e86\u3002<\/p>\n\n\n\n<p>vagrant ssh \u4e4b\u6240\u4ee5\u53ef\u4ee5\u767b\u5165\uff0c\u662f\u56e0\u70ba\u5728\u521d\u59cb\u5316\u865b\u64ec\u6a5f\u6642\uff0c\u9810\u5148\u7522\u751f\u597d SSH Key\uff0c\u4e26\u4e14\u628a SSH public key \u653e\u5230\u865b\u64ec\u6a5f\u88e1\u4e86\u3002\u53e6\u5916\u4e00\u7a2e\u89e3\u6c7a\u65b9\u6cd5\uff0c\u5c31\u662f\u4f7f\u7528\u7522\u751f\u597d\u7684 SSH private key \u4f86\u767b\u5165\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh -i .vagrant\/machines\/&lt;your_machine_name>\/virtualbox\/private_key ubuntu@&lt;your_machine_ip><\/code><\/pre>\n\n\n\n<p>\u53c3\u8003\u8cc7\u6599\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/blog.almx.cc\/2018\/02\/547\">SSH Login Failed : Permission denied (publickey,gssapi-keyex,gssapi-with-mic)<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u8a66\u8457\u76f4\u63a5\u4f7f\u7528 SSH \u767b\u5165 vagrant \u958b\u51fa\u4f86\u7684 Ubuntu \u865b\u64ec\u6a5f\uff0c\u6703\u51fa\u73fe\u932f\u8aa4\u8a0a\u606f\uff1a SSH Login Failed : Permission denied (publickey,gssapi-keyex,gssapi-with-mic) \u53ef\u662f\u7528 vagrant ssh \u537b\u53ef\u4ee5\u767b\u5165\uff0c\u7528 vagrant ssh \u767b\u5165\u9032\u53bb\u67e5\uff0cSSH daemon \u6709\u555f\u52d5\uff0c\u6240\u4ee5 SSH \u670d\u52d9\u662f\u6c92\u554f\u984c\u7684\u3002\u5f8c\u4f86\u900f\u904e\u932f\u8aa4\u8a0a\u606f\u624d\u67e5\u5230\uff0c\u662f SSH Daemon \u88e1\u7684 PasswordAuthentication \u88ab\u8a2d\u5b9a\u70ba no \u4e86\u3002\u6240\u4ee5\u4fee\u6539 \/etc\/ssh\/sshd_config \uff0c\u5c07 PasswordAuthentication \u8a2d\u5b9a\u70ba yes \u5f8c\uff0c\u5c31\u53ef\u4ee5\u7528 ssh \u767b\u5165\u4e86\u3002 vagrant ssh \u4e4b\u6240\u4ee5\u53ef\u4ee5\u767b\u5165\uff0c\u662f\u56e0\u70ba\u5728\u521d\u59cb\u5316\u865b\u64ec\u6a5f\u6642\uff0c\u9810\u5148\u7522\u751f\u597d SSH Key\uff0c\u4e26\u4e14\u628a SSH public key \u653e\u5230\u865b\u64ec\u6a5f\u88e1\u4e86\u3002\u53e6\u5916\u4e00\u7a2e\u89e3\u6c7a\u65b9\u6cd5\uff0c\u5c31\u662f\u4f7f\u7528\u7522\u751f\u597d\u7684 SSH private key \u4f86\u767b\u5165\u3002 \u53c3\u8003\u8cc7\u6599\uff1a SSH &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/2020\/12\/vagrant-ssh-login-failed\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u76f4\u63a5\u7528 SSH \u767b\u5165 vagrant \u865b\u64ec\u6a5f\u5931\u6557&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8],"tags":[149,91],"class_list":["post-3771","post","type-post","status-publish","format-standard","hentry","category-linux-","tag-ssh","tag-vagrant"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2MOxp-YP","_links":{"self":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts\/3771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/comments?post=3771"}],"version-history":[{"count":2,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts\/3771\/revisions"}],"predecessor-version":[{"id":3773,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts\/3771\/revisions\/3773"}],"wp:attachment":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/media?parent=3771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/categories?post=3771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/tags?post=3771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}