{"id":295,"date":"2018-10-09T16:37:17","date_gmt":"2018-10-09T08:37:17","guid":{"rendered":"https:\/\/wp.yaanren.win\/?p=295"},"modified":"2018-10-09T16:37:17","modified_gmt":"2018-10-09T08:37:17","slug":"%e7%94%a8ssh%e5%b7%a5%e5%85%b7xshell%e8%bf%9e%e6%8e%a5%e8%b0%b7%e6%ad%8c%e4%ba%91%ef%bc%88gcp%ef%bc%89","status":"publish","type":"post","link":"https:\/\/wp.625300.xyz\/?p=295","title":{"rendered":"\u7528SSH\u5de5\u5177XShell\u8fde\u63a5\u8c37\u6b4c\u4e91\uff08GCP\uff09"},"content":{"rendered":"<div class=\"article-header-box\">\n<div class=\"article-header\">\n<div class=\"article-title-box\"><\/div>\n<\/div>\n<\/div>\n<article>\n<div id=\"article_content\" class=\"article_content clearfix csdn-tracking-statistics\" data-pid=\"blog\" data-mod=\"popu_307\" data-dsm=\"post\">\n<div class=\"article-copyright\">\u8f6c\u8f7d\u81ea\uff1a https:\/\/blog.csdn.net\/datadev_sh\/article\/details\/79593360<\/div>\n<div class=\"markdown_views\">\n<p>&nbsp;<\/p>\n<h1 id=\"1\u7528root\u7528\u6237\u767b\u5165\"><a name=\"t1\"><\/a>1.\u7528root\u7528\u6237\u767b\u5165<\/h1>\n<h2 id=\"11\u8fdb\u5165\u8c37\u6b4c\u4e91\u5b9e\u4f8b\u9762\u677f\"><a name=\"t2\"><\/a>1.1.\u8fdb\u5165\u8c37\u6b4c\u4e91\u5b9e\u4f8b\u9762\u677f<\/h2>\n<h2 id=\"12\u5207\u6362\u5230root\u89d2\u8272\"><a name=\"t3\"><\/a>1.2.\u5207\u6362\u5230root\u89d2\u8272<\/h2>\n<pre class=\"prettyprint\"><code class=\"hljs bash has-numbering\"><span class=\"hljs-built_in\">sudo<\/span> -i <\/code><\/pre>\n<h2 id=\"13\u4fee\u6539ssh\u914d\u7f6e\u6587\u4ef6etcsshsshdconfig\"><a name=\"t4\"><\/a>1.3.\u4fee\u6539SSH\u914d\u7f6e\u6587\u4ef6\/etc\/ssh\/sshd_config<\/h2>\n<pre class=\"prettyprint\"><code class=\"hljs has-numbering\">vi \/etc\/ssh\/sshd_config<\/code><\/pre>\n<p>\u4fee\u6539PermitRootLogin\u548cPasswordAuthentication\u4e3ayes<\/p>\n<pre class=\"prettyprint\"><code class=\"hljs coffeescript has-numbering\"><span class=\"hljs-comment\"># Authentication:<\/span>\nPermitRootLogin <span class=\"hljs-literal\">yes<\/span> <span class=\"hljs-regexp\">\/\/<\/span>\u9ed8\u8ba4\u4e3a<span class=\"hljs-literal\">no<\/span>\uff0c\u9700\u8981\u5f00\u542froot\u7528\u6237\u8bbf\u95ee\u6539\u4e3a<span class=\"hljs-literal\">yes<\/span>\n\n<span class=\"hljs-comment\"># Change to no to disable tunnelled clear text passwords<\/span>\nPasswordAuthentication <span class=\"hljs-literal\">yes<\/span> <span class=\"hljs-regexp\">\/\/<\/span>\u9ed8\u8ba4\u4e3a<span class=\"hljs-literal\">no<\/span>\uff0c\u6539\u4e3a<span class=\"hljs-literal\">yes<\/span>\u5f00\u542f\u5bc6\u7801\u767b\u9646<\/code><\/pre>\n<h2 id=\"14\u7ed9root\u7528\u6237\u8bbe\u7f6e\u5bc6\u7801\"><a name=\"t5\"><\/a>1.4.\u7ed9root\u7528\u6237\u8bbe\u7f6e\u5bc6\u7801<\/h2>\n<pre class=\"prettyprint\"><code class=\"hljs has-numbering\">passwd root<\/code><\/pre>\n<h2 id=\"15\u91cd\u542fssh\u670d\u52a1\u4f7f\u4fee\u6539\u751f\u6548\"><a name=\"t6\"><\/a>1.5.\u91cd\u542fSSH\u670d\u52a1\u4f7f\u4fee\u6539\u751f\u6548<\/h2>\n<pre class=\"prettyprint\"><code class=\"hljs avrasm has-numbering\">\/etc\/init<span class=\"hljs-preprocessor\">.d<\/span>\/ssh restart<\/code><\/pre>\n<h1 id=\"2\u65b0\u5efa\u666e\u901a\u7528\u6237\u767b\u5165\"><a name=\"t7\"><\/a>2.\u65b0\u5efa\u666e\u901a\u7528\u6237\u767b\u5165<\/h1>\n<h2 id=\"21-\u672c\u5730\u7528xshell\u751f\u6210\u5bc6\u79d8\u94a5\"><a name=\"t8\"><\/a>2.1. \u672c\u5730\u7528xshell\u751f\u6210\u5bc6\u79d8\u94a5<\/h2>\n<h2 id=\"22-\u5c06\u79d8\u94a5\u914d\u7f6e\u5230\u8c37\u6b4c\u4e91\u4e0a\"><a name=\"t9\"><\/a>2.2. \u5c06\u79d8\u94a5\u914d\u7f6e\u5230\u8c37\u6b4c\u4e91\u4e0a<\/h2>\n<blockquote><p>\u83dc\u5355 \u2014 \u8ba1\u7b97\u5f15\u64ce \u2014 \u5143\u6570\u636e \u2014 SSH\u79d8\u94a5 \u2014 \u4fee\u6539 \u2014 \u6dfb\u52a0\u4e00\u9879<\/p><\/blockquote>\n<blockquote><p>\u7c98\u8d34\u521a\u624d\u4ecexshell\u590d\u5236\u7684\u79d8\u94a5\u3002\u5728\u672b\u5c3e\u6dfb\u52a0 [\u7a7a\u683c][\u7528\u6237\u540d] \u8fd9\u91cc\u5c31\u662f\u201c google\u201d\uff0c\u4fdd\u5b58\u5373\u53ef\u3002<\/p><\/blockquote>\n<h2 id=\"23-\u7528xshell\u8fde\u63a5\"><a name=\"t10\"><\/a>2.3. \u7528xshell\u8fde\u63a5<\/h2>\n<blockquote><p>\u8fde\u4e0a\u4e4b\u540e\uff0c\u8f93\u5165\u547d\u4ee4\u00a0<code>sudo -i<\/code>\u5207\u6362\u5230root\u7528\u6237.<\/p><\/blockquote>\n<h1 id=\"3\u542f\u52a8shadowsocks\u5931\u8d25\"><\/h1>\n<\/div>\n<\/div>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\u81ea\uff1a https:\/\/blog.csdn.net\/datadev_sh\/article\/details\/7&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-295","post","type-post","status-publish","format-standard","hentry","category-v2ray"],"_links":{"self":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=295"}],"version-history":[{"count":0,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/295\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}