scp从服务器下载文件到本地或从本地上传文件到服务器

参考网址:http://blog.csdn.net/xingzhedai/article/details/52586341
1、从服务器下载文件

scp username@servername:/remote_path/filename ~/local_destination

2、上传本地文件到服务器
scp ~/local_path/local_filename username@servername:/remote_path

3、从服务器下载整个目录
scp -r username@servername:/remote_path/remote_dir/ ~/local_destination

scp user@远程地址:~/文件目录 本地目录

4、上传目录到服务器
scp -r ~/local_dir username@servername:/remote_path/remote_dir

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,859评论 18 139
  • 1、从服务器下载文件 scp username@servername:/path/filename /tmp/lo...
    V会飞的蜗牛阅读 492评论 0 0
  • 在linux下一般用scp这个命令来通过ssh传输文件。 1、从服务器上下载文件 scp username@ser...
    MiracleJQ阅读 226评论 0 0
  • 那天早上,我收到一条留言,是已经毕业两年的C写给我的,他问我:“老师,你还记得我那份作业吗?”我知道他说的是那一封...
    我是杜娘阅读 369评论 0 2
  • 昨天参加了树舍组织的《穷爸爸富爸爸现金流》游戏,对个人理财观念产生了触动,马上在京东买了一套游戏装备和系列图书,便...
    承谦阅读 251评论 0 0