linux 远程文件传输

1、获取远程服务器的文件

  scp root@host_ip:/root/tmp.log /home/tmp.log

   远程vps不是22端口的要指定端口

  scp -P 29771 root@host_ip:/root/tmp.log /home/tmp.log

2 、发送本地文件到远程服务器上

 本地执行

  scp /home/tmp.log  root@host_ip:/root/tmp.log

原文地址:https://www.cnblogs.com/nienie/p/9004248.html