zoukankan      html  css  js  c++  java
  • scp 利用 ssh 协议 复制文件

    有时候,我们使用 scp 命令可以解决我们很多问题:

    NAME
         scp — secure copy (remote file copy program)

    使用举例:拷贝当前文件,到 系统 10.66.65.15 之中

    scp ~/Downloads/镜像文件/Qubes-R4.0-x86_64.iso root@10.66.65.15:/home/yaowen/

    2019.11.25补充:

    当对一个目录下的所有的文件进行拷贝时:使用 -r 参数,进行递归访问;

    注意事项:

    -P port Specifies the port to connect to on the remote host. Note that this option is written with a capital ‘P’, because -p is already reserved for preserving the times and modes of the file.

    使用 scp 要注意 文件路径,如果有防火墙要注意端口,如果使用 非root用户,还要确定是否对远程主机目录有读写权限。

    保持更新,转载请注明出处。

  • 相关阅读:
    GCD 并行子线程
    iOS开发>学无止境
    iOS开发>学无止境
    iOS开发>学无止境
    FMDB使用
    递归
    局部变量与全局变量
    函数式编程与参数
    文件的操作
    集合的操作
  • 原文地址:https://www.cnblogs.com/xuyaowen/p/scp_to_another_filesys.html
Copyright © 2011-2022 走看看