Examples

Copy the file "foobar.txt" from a remote host to the local host

$ scp your_username@remotehost.edu:foobar.txt /some/local/directory

Copy the file "foobar.txt" from the local host to a remote host

$ scp foobar.txt your_username@remotehost.edu:/some/remote/directory

Copy the directory "foo" from the local host to a remote host's directory "bar"

$ scp -r foo your_username@remotehost.edu:/some/remote/directory/bar

Copy the file "foobar.txt" from remote host "rh1.edu" to remote host "rh2.edu"

$ scp your_username@rh1.edu:/some/remote/directory/foobar.txt \

your_username@rh2.edu:/some/remote/directory/

Copying the files "foo.txt" and "bar.txt" from the local host to your home directory on the remote host

$ scp foo.txt bar.txt your_username@remotehost.edu:~

Copy the file "foobar.txt" from the local host to a remote host using port 2264

$ scp -P  foobar.txt your_username@remotehost.edu:/some/remote/directory

Copy multiple files from the remote host to your current directory on the local host

$ scp your_username@remotehost.edu:/some/remote/directory/\{a,b,c\} .
$ scp your_username@remotehost.edu:~/\{foo.txt,bar.txt\} .

scp Performance

By default scp uses the Triple-DES cipher to encrypt the data being sent. Using the Blowfish cipher has been shown to increase speed. This can be done by using option -c blowfish in the command line.

$ scp -c blowfish some_file your_username@remotehost.edu:~

It is often suggested that the -C option for compression should also be used to increase speed. The effect of compression, however, will only significantly increase speed if your connection is very slow. Otherwise it may just be adding extra burden to the CPU. An example of using blowfish and compression:

$ scp -c blowfish -C local_file your_username@remotehost.edu:~

scp with public key:

scp -i <your key> other params

scp: useful commands的更多相关文章

  1. linux下不同服务器间数据传输(rcp,scp,rsync,ftp,sftp,lftp,wget,curl)(zz)

    linux下不同服务器间数据传输(rcp,scp,rsync,ftp,sftp,lftp,wget,curl) 分类: linux2011-10-10 13:21 8773人阅读 评论(1) 收藏 举 ...

  2. man scp

    SCP(1)   BSD General Commands Manual   SCP(1) NAME     scp - secure copy (remote file copy program) ...

  3. linux下ssh远程登录/scp远程复制文件/rsync远程同步命令的自动登录

    最近需要写一个脚本备份各个服务器上的程序到一个指定服务器上,本来以为查查rsync命令的使用321就能搞定,结果rsync命令要支持自动登 录还是要配置服务和参数,又不确定网上说的配置的行不行,因为都 ...

  4. linux下不同服务器间数据传输(wget,scp)

    一.wget是Linux下最常用的http/ftp文件下载工具1.wget断点续传,只需要加上-c参数即可,例如:代码:wget-chttp://www.abc.com/abc.zip-Oabc.zi ...

  5. 浅记初次使用expect、scp中出现的一些小问题

    以前也学过一些shell,不过学得并不是很深入,动手写的代码的时间也不是很多.前不久将shell比较细的过了一遍,leader布置了任务让用shell写一个脚本将redis源码压缩包从一个服务器上传到 ...

  6. Linux下只允许用户远程scp

    本文将介绍在Linux环境下,让用户不能远程登录 只能使用scp命令 使用到的软件:rssh(http://pizzashack.org/rssh/index.shtml ) 环境:centos6.x ...

  7. k8s与CICD--借助scp插件实现非容器项目的部署

    一直没有时间完成drone系列文章.drone-wechat插件实现了一半,由于企业微信token申请比较麻烦,所以也没有进展.今天抽出时间,研究了一下scp插件,主要目的是实现非容器项目的部署.其实 ...

  8. SSH SCP 远程密钥登录配置和服务器间的文件传输

    目录 ssh ssh是什么 ssh安装 使用ssh登录远程主机 退出登录 使用ssh执行单条指令 密钥验证 详细操作 scp rsync sftp 进阶 ssh ssh是什么 ssh (Secure ...

  9. linux下不同服务器间数据传输(rcp,scp,rsync,ftp,sftp,lftp,wget,curl)

    因为工作原因,需要经常在不同的服务器见进行文件传输,特别是大文件的传输,因此对linux下不同服务器间数据传输命令和工具进行了研究和总结.主要是rcp,scp,rsync,ftp,sftp,lftp, ...

随机推荐

  1. excel 录入oracle 方法

    http://blog.itpub.net/28602568/viewspace-1797410/ 1.方法1:外部表 1.将excel另存为.txt格式(2种txt 格式都可以),再传到数据库dir ...

  2. 409 Longest Palindrome 最长回文串

    给定一个包含大写字母和小写字母的字符串,找到通过这些字母构造成的最长的回文串.在构造过程中,请注意区分大小写.比如 "Aa" 不能当做一个回文字符串.注意:假设字符串的长度不会超过 ...

  3. java https客户端请求

    String pathname = Test3.class.getResource("/client.jks").getFile(); System.out.println(pat ...

  4. js中将html文档写入静态界面当中

    1.静态界面当中: <div id="test"></div> 2.在js当中写入 $("#test").append(html文档内容 ...

  5. php数据类型的转换

    1.强制类型的转换 setType('变量','值') 值:可以是8大数据类型的任何一种 变量:(8大数据类型)需要转换的变量 $var="123abc"; setType($va ...

  6. Errors reported here must be corrected before the service can be started

    场景: 安装.配置Apache24时候,最后会给出提示,如图:Errors reported here must be corrected before the service can be star ...

  7. binlog_format不同模式下,对mysqlbinlog恢复的影响

      binlog_format='mixed' (root)[(none)]>use test; Reading table information for completion of tabl ...

  8. Jmeter之重定向请求

    一.自动重定向和跟随重定向的区别 自动重定向:状态码一般是200.20X.当重定向自动跳转时,只针对GET和Head请求,自动重定向自动跳转到最终目标页面,当HTTP请求为自动重定向时,JMeter不 ...

  9. VR虚拟红包的技术实现

    2017年1月20日,腾讯发布消息称将推出Q-Glass,除了一般VR眼镜的标配功能外,Q-Glass还能实现眨眼抢红包.听起来是不是很酷炫?上市时间可要在10年后.不过,2016年底支付宝首推AR实 ...

  10. Angular ZoneJS 原理

    Zone.js到底是如何工作的? 原文链接: blog.kwintenp.com 如果你阅读过关于Angular 2变化检测的资料,那么你很可能听说过zone.Zone是一个从Dart中引入的特性并被 ...