\u5c06\u6587\u4ef6\u590d\u5236\u5230\u8fdc\u7a0b Linux \u670d\u52a1\u5668<\/strong><\/div>\n\u5728\u4e0b\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u5c06logs.tar.gz \u590d\u5236\u5230\u8fdc\u7a0b\u4e3b\u673a\u7684\/root\u76ee\u5f55\u4e0b\u3002\u4e3b\u673aIP\u4e3a192.168.43.137\uff0c\u7528\u6237\u540d\u4e3aroot\u3002<\/p>\n
\r\n[root@server1 ~]# scp logs.tar.gz root@192.168.43.137:\/root\r\n<\/pre>\n
\n\u5982\u679c\u8981\u590d\u5236\u76ee\u5f55\uff0c\u8bf7\u4f7f\u7528-r<\/code>\u9009\u9879\uff0c\u5982\u4e0b\u6240\u793a\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06 \/root\/syslog\u76ee\u5f55\u590d\u5236\u5230\u8fdc\u7a0b\u8282\u70b9\u7684\/root\u76ee\u5f55\u4e2d\u3002<\/p>\n\r\n[root@server1 ~]# scp -r syslog root@192.168.43.137:\/root\r\n<\/pre>\n
\n\u5982\u679c\u4e0d\u6dfb\u52a0-r<\/code>\u9009\u9879\u590d\u5236\u76ee\u5f55\uff0c\u4f1a\u63d0\u793a\u5982\u4e0b\u9519\u8bef\u3002<\/p>\n\r\n[root@server1 ~]# scp syslog root@192.168.43.137:\/root\r\nroot@192.168.43.137's password: \r\nsyslog: not a regular file\r\n<\/pre>\n<\/p>\n
\u5c06\u6587\u4ef6\u4ece\u8fdc\u7a0b\u7cfb\u7edf\u590d\u5236\u5230\u672c\u5730\u7cfb\u7edf<\/strong><\/div>\n\u53ef\u4ee5\u5c06\u6587\u4ef6\u4ece\u8fdc\u7a0b\u8282\u70b9\u590d\u5236\u5230\u672c\u5730\u7cfb\u7edf\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n
\r\n$ scp [option] user@server-ip:\/path\/to\/source\/file\/path\/to\/local\/directory\r\n<\/pre>\n\u5728\u4e0b\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u6587\u4ef6 \/root\/passwd<\/code>\u4ece\u8fdc\u7a0b\u7cfb\u7edf\u590d\u5236\u5230\u672c\u5730\u7cfb\u7edf\uff1a<\/p>\n\r\n[root@server1 ~]# scp root@192.168.43.137:\/root\/passwd \/root\/\r\n<\/pre>\n
\n\u540c\u6837\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528-r<\/code>\u6807\u5fd7\u5c06\u76ee\u5f55\u4ece\u8fdc\u7a0b\u4e3b\u673a\u590d\u5236\u5230\u672c\u5730\u7cfb\u7edf\uff0c\u5982\u56fe\u6240\u793a\u3002<\/p>\n\r\n[root@server1 ~]# scp -r root@192.168.43.137:\/root\/scripts \/root\/\r\n<\/pre>\n
\n\u6709\u5173\u4f7f\u7528 scp<\/code> \u547d\u4ee4\u7684\u66f4\u591a\u9009\u9879\uff0c\u53ef\u4ee5\u67e5\u770b\u624b\u518c\uff0c\u547d\u4ee4\u662f\uff1aman scp<\/code>
\n<\/p>\n\u603b\u7ed3<\/strong><\/div>\nLinux SCP \u547d\u4ee4\u662f\u4e00\u79cd\u5728\u4e24\u4e2a\u8fdc\u7a0b\u8282\u70b9\u4e4b\u95f4\u4f20\u8f93\u6587\u4ef6\u7684\u4fbf\u6377\u4e14\u5b89\u5168\u7684\u65b9\u5f0f\uff0c\u800c\u65e0\u9700\u62c5\u5fc3\u653b\u51fb\u8005\u7aa5\u63a2\u4f60\u7684\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u4e0b\u9762\u63d0\u4f9b\u4e86 SCP \u547d\u4ee4\u7684\u57fa\u672c\u8bed\u6cd5\uff1a $ scp [option] \/path\/to\/source\/file […]<\/p>\n","protected":false},"author":309,"featured_media":221785,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-221783","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/221783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=221783"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/221783\/revisions"}],"predecessor-version":[{"id":221791,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/221783\/revisions\/221791"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/221785"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=221783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=221783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=221783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}