{"id":2405,"date":"2013-01-06T20:43:58","date_gmt":"2013-01-06T12:43:58","guid":{"rendered":"https:\/\/kyle.ai\/blog\/?p=2405"},"modified":"2013-01-06T21:35:11","modified_gmt":"2013-01-06T13:35:11","slug":"ssh-scp-%e4%b8%8d%e8%be%93%e5%85%a5%e5%af%86%e7%a0%81","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/2405.html","title":{"rendered":"SSH, SCP \u4e0d\u8f93\u5165\u5bc6\u7801"},"content":{"rendered":"<p><span style=\"font-size: small;\">\u7ecf\u5e38\u5728\u4e0d\u540clinux\u673a\u5668\u4e4b\u95f4\u4e92\u76f8scp\u62f7\u6587\u4ef6\uff0c\u6bcf\u6b21\u603b\u662f\u8981\u8f93\u5165\u5bc6\u7801\u624d\u53ef\u884c\u3002<\/span><\/p>\n<p><span style=\"font-size: small;\">\u901a\u8fc7ssh-keygen\u751f\u6210\u516c\u94a5\uff0c\u5728\u4e24\u53f0\u673a\u5668\u4e4b\u95f4\u4e92\u76f8\u5efa\u7acb\u4fe1\u4efb\u901a\u9053\u5373\u53ef\u3002\u5047\u8bbe\u672c\u5730\u673a\u5668client\uff0c\u8fdc\u7a0b\u673a\u5668\u4e3aserver\u3002<\/span><\/p>\n<p><span style=\"font-size: small;\">\u751f\u6210rsa keygen<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nchenming@chenming-Aspire-5830TG:~$ ssh-keygen -b 1024 -t rsa\r\nGenerating public\/private rsa key pair.\r\nEnter file in which to save the key (\/home\/chenming\/.ssh\/id_rsa):\r\nEnter passphrase (empty for no passphrase):\r\nEnter same passphrase again:\r\nYour identification has been saved in \/home\/chenming\/.ssh\/id_rsa.\r\nYour public key has been saved in \/home\/chenming\/.ssh\/id_rsa.pub.\r\nThe key fingerprint is:\r\n0c:b7:ee:05:c1:bb:5b:3f:f1:7f:49:8f:64:23:ad:c2 chenming@chenming-Aspire-5830TG\r\nThe key's randomart image is:\r\n+--&#x5B; RSA 1024]----+\r\n|                 |\r\n|       .         |\r\n|      . +        |\r\n|       + +       |\r\n|        S    .   |\r\n|       . o  o =. |\r\n|        o.o  B.oo|\r\n|       . +E.o o.o|\r\n|        o  ... .o|\r\n+-----------------+\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u76f4\u63a5\u4e0a\u9762\u516c\u94a5\u548c\u79c1\u94a5\u5b58\u653e\u5730\u5740\u53ef\u4ee5\u76f4\u63a5\u56de\u8f66\uff0c\u79c1\u94a5\u5bc6\u7801\u53ef\u4ee5\u76f4\u63a5\u56de\u8f66\uff0c\u4e5f\u53ef\u4ee5\u8f93\u5165\u3002<\/span><\/p>\n<p><span style=\"font-size: small;\">\u67e5\u770b.ssh\u76ee\u5f55\u4e0b\u4e86\u591a\u79c1\u94a5\u548c\u516c\u94a5\u6587\u4ef6<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nchenming@chenming-Aspire-5830TG:~$ ls .ssh\r\nid_rsa  id_rsa.pub  known_hosts\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u62f7\u8d1d\u516c\u94a5\u5230\u76ee\u6807\u673a\u5668\u4e0a\uff0c\u5e76\u6539\u540d\u6210 authorized_keys<\/span><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nscp ~\/.ssh\/id_rsa.pub kyle.ai:\/root\/.ssh\/authorized_keys\r\n<\/pre>\n<p><span style=\"font-size: small;\">\u9996\u6b21scp\u547d\u4ee4\u65f6\u5019\u8fd8\u662f\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\uff0c\u8fd8\u6709\u662f\u5426\u7ee7\u7eed\u94fe\u63a5\u7684\u63d0\u793a\uff0c\u4ee5\u540e\u5c31\u53ef\u4ee5\u76f4\u63a5\u8fdb\u53bb\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7ecf\u5e38\u5728\u4e0d\u540clinux\u673a\u5668\u4e4b\u95f4\u4e92\u76f8scp\u62f7\u6587\u4ef6\uff0c\u6bcf\u6b21\u603b\u662f\u8981\u8f93\u5165\u5bc6\u7801\u624d\u53ef\u884c\u3002 \u901a\u8fc7ssh-keygen\u751f\u6210\u516c\u94a5\uff0c\u5728 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-2405","post","type-post","status-publish","format-standard","hentry","category-skill"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=2405"}],"version-history":[{"count":2,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2405\/revisions"}],"predecessor-version":[{"id":2407,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2405\/revisions\/2407"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=2405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=2405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=2405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}