scp: useful commands
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的更多相关文章
- 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) 收藏 举 ...
- man scp
SCP(1) BSD General Commands Manual SCP(1) NAME scp - secure copy (remote file copy program) ...
- linux下ssh远程登录/scp远程复制文件/rsync远程同步命令的自动登录
最近需要写一个脚本备份各个服务器上的程序到一个指定服务器上,本来以为查查rsync命令的使用321就能搞定,结果rsync命令要支持自动登 录还是要配置服务和参数,又不确定网上说的配置的行不行,因为都 ...
- linux下不同服务器间数据传输(wget,scp)
一.wget是Linux下最常用的http/ftp文件下载工具1.wget断点续传,只需要加上-c参数即可,例如:代码:wget-chttp://www.abc.com/abc.zip-Oabc.zi ...
- 浅记初次使用expect、scp中出现的一些小问题
以前也学过一些shell,不过学得并不是很深入,动手写的代码的时间也不是很多.前不久将shell比较细的过了一遍,leader布置了任务让用shell写一个脚本将redis源码压缩包从一个服务器上传到 ...
- Linux下只允许用户远程scp
本文将介绍在Linux环境下,让用户不能远程登录 只能使用scp命令 使用到的软件:rssh(http://pizzashack.org/rssh/index.shtml ) 环境:centos6.x ...
- k8s与CICD--借助scp插件实现非容器项目的部署
一直没有时间完成drone系列文章.drone-wechat插件实现了一半,由于企业微信token申请比较麻烦,所以也没有进展.今天抽出时间,研究了一下scp插件,主要目的是实现非容器项目的部署.其实 ...
- SSH SCP 远程密钥登录配置和服务器间的文件传输
目录 ssh ssh是什么 ssh安装 使用ssh登录远程主机 退出登录 使用ssh执行单条指令 密钥验证 详细操作 scp rsync sftp 进阶 ssh ssh是什么 ssh (Secure ...
- linux下不同服务器间数据传输(rcp,scp,rsync,ftp,sftp,lftp,wget,curl)
因为工作原因,需要经常在不同的服务器见进行文件传输,特别是大文件的传输,因此对linux下不同服务器间数据传输命令和工具进行了研究和总结.主要是rcp,scp,rsync,ftp,sftp,lftp, ...
随机推荐
- 关于dbms_output包的使用
General Source {ORACLE_HOME}/rdbms/admin/dbmsotpt.sql First Available 7.3.4 Data Types TYPE chararr ...
- Hadoop Hive概念学习系列之hive的数据压缩(七)
Hive文件存储格式包括以下几类: 1.TEXTFILE 2.SEQUENCEFILE 3.RCFILE 4.ORCFILE 其中TEXTFILE为默认格式,建表时不指定默认为这个格式,导入数据时会直 ...
- Hadoop的数据采集框架
问题导读: Hadoop数据采集框架都有哪些? Hadoop数据采集框架异同及适用场景? Hadoop提供了一个高度容错的分布式存储系统,帮助我们实现集中式的数据分析和数据共享.在日常应用中我们比如要 ...
- MVC的学习-EF的认识
1.什么是EF EF又称持久层框架:平时C#定义的变量是保存到内存中的,一断电就没有了.而持久的意思是数据保存到硬盘盘里(数据库的sql查询是在硬盘里进行的,所以速度很慢).EF帮我们将一个对象保存到 ...
- headroom.js使用
为页面顶部多留些空间.在不需要页头时将其隐藏 需要添加的css代码 .headroom { transition: transform 200ms linear; } .headroom--pinne ...
- js实现左右点击图片层叠滚动特效
需要加载js有 <script type="text/javascript" src="js/jquery-1.7.2.min.js"></s ...
- Python,报错NameError: name 'math' is not defined
1 #-*- coding : utf-8 -*- 2 import math 3 4 def move(x, y, step, angle=0): 5 nx = x + step * math.co ...
- MVC之参数验证(一)
ASP.NET MVC采用Model绑定为目标Action生成了相应的参数列表,但是在真正执行目标Action方法之前,还需要对绑定的参数实施验证以确保其数据的准确性.总地来说,我们可以采用Syste ...
- ListView用法
public class MainActivity extends Activity implements OnItemClickListener, OnScrollListener { privat ...
- 机器学习_K近邻Python代码详解
k近邻优点:精度高.对异常值不敏感.无数据输入假定:k近邻缺点:计算复杂度高.空间复杂度高 import numpy as npimport operatorfrom os import listdi ...