{"id":3892,"date":"2019-07-21T23:48:15","date_gmt":"2019-07-21T15:48:15","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3892"},"modified":"2023-12-05T03:57:18","modified_gmt":"2023-12-04T19:57:18","slug":"ssh-copy-id","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/ssh-copy-id","title":{"rendered":"ssh-copy-id\u547d\u4ee4 &#8211; \u590d\u5236SSH\u516c\u94a5\u5230\u8fdc\u7a0b\u4e3b\u673a"},"content":{"rendered":"\n<p>ssh-copy-id\u547d\u4ee4\u6765\u81ea\u82f1\u6587\u8bcd\u7ec4ssh copy id\uff0c\u5176\u529f\u80fd\u662f\u5c06\u672c\u5730\u751f\u6210\u7684SSH\u516c\u94a5\u4fe1\u606f\u590d\u5236\u5230\u8fdc\u7a0b\u4e3b\u673a\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u8fd0\u7ef4\u4eba\u5458\u4f1a\u5148\u4f7f\u7528ssh-keygen\u547d\u4ee4\u751f\u6210SSH\u5bc6\u94a5\u5bf9\uff08\u516c\u94a5\/\u79c1\u94a5\uff09\u6587\u4ef6\uff0c\u968f\u540e\u4f7f\u7528ssh-copy-id\u547d\u4ee4\u5c06\u516c\u94a5\u6587\u4ef6\u590d\u5236\u5230\u8fdc\u7a0b\u4e3b\u673a\u4e0a\uff0c\u8fd9\u6837\u64cd\u4f5c\u540e\uff0c\u518d\u8fdb\u884c\u8fdc\u7a0bSSH\u8bbf\u95ee\u65f6\u5c06\u65e0\u987b\u8fdb\u884c\u8d26\u53f7\u5bc6\u7801\u9a8c\u8bc1\uff0c\u800c\u662f\u901a\u8fc7\u5bc6\u94a5\u65b9\u5f0f\u767b\u5f55\u3002<\/p>\n\n\n\n<p><strong>\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>ssh-copy-id \u53c2\u6570 \u57df\u540d\u6216IP\u5730\u5740<\/p>\n\n\n\n<p><strong>\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>-f<\/td><td>\u5f3a\u5236\u590d\u5236\u800c\u4e0d\u8be2\u95ee<\/td><td rowspan=\"2\">&nbsp;<\/td><td>-n<\/td><td>\u4ec5\u6d4b\u8bd5\uff0c\u800c\u4e0d\u5b9e\u9645\u64cd\u4f5c<\/td><\/tr><tr><td>-i<\/td><td>\u8bbe\u7f6e\u516c\u94a5\u6587\u4ef6\u8def\u5f84<\/td><td>-p<\/td><td>\u8bbe\u7f6e\u4f7f\u7528\u7684\u7aef\u53e3\u53f7<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u53c2\u8003\u793a\u4f8b<\/strong><\/p>\n\n\n\n<p>\u5c06SSH\u516c\u94a5\u6587\u4ef6\u590d\u5236\u5230\u8fdc\u7a0b\u4e3b\u673a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# ssh-copy-id 192.168.10.10 \r\nThe authenticity of host '192.168.10.10 (192.168.10.10)' can't be established. \r\nECDSA key fingerprint is SHA256:212\/FhZ+6JFs5psuMJx9+5alyW6QDzviE0miulDPiKk. \r\nAre you sure you want to continue connecting (yes\/no)? yes \r\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed \r\n\/usr\/bin\/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys \r\nroot@192.168.10.10's password: \u6b64\u5904\u8f93\u5165\u8fdc\u7a0b\u4e3b\u673a\u7ba1\u7406\u5458\u5bc6\u7801\r\n\r\nNumber of key(s) added: 1 \r\n\r\nNow try logging into the machine, with: \"ssh '192.168.10.10'\" \r\nand check to make sure that only the key(s) you wanted were added.\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ssh-copy-id\u547d\u4ee4\u6765\u81ea\u82f1\u6587\u8bcd\u7ec4ssh copy id\uff0c\u5176\u529f\u80fd\u662f\u5c06\u672c\u5730\u751f\u6210\u7684SSH\u516c\u94a5\u4fe1\u606f\u590d\u5236\u5230\u8fdc\u7a0b\u4e3b\u673a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-3892","post","type-post","status-publish","format-standard","hentry","category-system"],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=3892"}],"version-history":[{"count":16,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3892\/revisions"}],"predecessor-version":[{"id":16656,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3892\/revisions\/16656"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}