{"id":3892,"date":"2019-07-21T23:48:15","date_gmt":"2019-07-21T15:48:15","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3892"},"modified":"2022-05-10T16:26:50","modified_gmt":"2022-05-10T08:26:50","slug":"ssh-copy-id","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/ssh-copy-id","title":{"rendered":"ssh-copy-id\u547d\u4ee4 – \u590d\u5236SSH\u516c\u94a5\u5230\u8fdc\u7a0b\u4e3b\u673a"},"content":{"rendered":"\n

ssh-copy-id\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cssh copy id\u201d\uff0c\u4e2d\u6587\u8bd1\u4e3a\u201c\u590d\u5236SSH\u4fe1\u606f\u201d\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\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\u6210\u51faSSH\u5bc6\u94a5\u5bf9\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\u518d\u8fdb\u884c\u8fdc\u7a0bSSH\u8bbf\u95ee\u65f6\u5c06\u65e0\u9700\u8fdb\u884c\u8d26\u53f7\u5bc6\u7801\u7684\u53e3\u4ee4\u9a8c\u8bc1\uff0c\u800c\u662f\u901a\u8fc7\u5bc6\u94a5\u65b9\u5f0f\u767b\u5f55\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>ssh-copy-id [\u53c2\u6570] \u8fdc\u7a0b\u4e3b\u673a<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-i<\/td>\u6307\u5b9a\u516c\u94a5\u6587\u4ef6<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u5c06SSH\u516c\u94a5\u6587\u4ef6\u590d\u5236\u5230\u8fdc\u7a0b\u4e3b\u673a\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ssh-copy-id 192.168.10.10<\/strong>\nThe authenticity of host '192.168.10.10 (192.168.10.10)' can't be established.\nECDSA key fingerprint is SHA256:212\/FhZ+6JFs5psuMJx9+5alyW6QDzviE0miulDPiKk.\nAre you sure you want to continue connecting (yes\/no)? yes<\/strong>\n\/usr\/bin\/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed\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\nroot@192.168.10.10's password: \u6b64\u5904\u8f93\u5165\u8fdc\u7a0b\u4e3b\u673a\u7ba1\u7406\u5458\u5bc6\u7801<\/strong>\n\nNumber of key(s) added: 1\n\nNow try logging into the machine, with:   \"ssh '192.168.10.10'\"\nand check to make sure that only the key(s) you wanted were added.<\/pre>\n","protected":false},"excerpt":{"rendered":"

ssh-copy-id\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cssh copy id\u201d\uff0c\u4e2d\u6587\u8bd1\u4e3a\u201c\u590d\u5236SSH\u4fe1\u606f\u201d\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5c06 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3892"}],"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":11,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3892\/revisions"}],"predecessor-version":[{"id":9466,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3892\/revisions\/9466"}],"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}]}}