57-scp

其格式为“scp [参数] 本地文件 远程帐户@远程 IP 地址:远程目录”。

#拷贝本地文件到远程主机
[root@localhost ~]# scp myhistory.txt root@192.168.31.20:/root
root@192.168.31.20's password: 
myhistory.txt                                                                  100%   23KB 337.1KB/s   00:00  

#拷贝远程主机文件到本地
[root@localhost ~]# scp root@192.168.31.20:/etc/redhat-release /root
root@192.168.31.20's password: 
redhat-release                                                                 100%   38    24.4KB/s   00:00
posted @ 2022-04-14 17:29  认真的coder  阅读(16)  评论(0编辑  收藏  举报