
SCP(1) BSD General Commands Manual SCP(1)
NAME
scp - secure copy (remote file copy program)
scp - secure copy (remote file copy program)
SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 [...] [[user@]host2:]file2
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 [...] [[user@]host2:]file2
DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for
data transfer, and uses the same authentication and provides the
same security as ssh(1). Unlike rcp(1), scp will ask for passwords
or passphrases if they are needed for authentication.
scp copies files between hosts on a network. It uses ssh(1) for
data transfer, and uses the same authentication and provides the
same security as ssh(1). Unlike rcp(1), scp will ask for passwords
or passphrases if they are needed for authentication.
Any file name may contain a host and user specification to indicate
that the file is to be copied to/from that host. Copies between
two remote hosts are permitted.
that the file is to be copied to/from that host. Copies between
two remote hosts are permitted.
When copying a source file to a target file which already exists,
scp will replace the contents of the target file (keeping the
inode).
scp will replace the contents of the target file (keeping the
inode).
If the target file does not yet exist, an empty file with the tar-
get file name is created, then filled with the source file con-
tents. No attempt is made at "near-atomic" transfer using tempo-
rary files.
get file name is created, then filled with the source file con-
tents. No attempt is made at "near-atomic" transfer using tempo-
rary files.
The options are as follows:
-1 Forces scp to use protocol 1.
-2 Forces scp to use protocol 2.
-4 Forces scp to use IPv4 addresses only.
-6 Forces scp to use IPv6 addresses only.
-B Selects batch mode (prevents asking for passwords or
passphrases).
passphrases).
-C Compression enable. Passes the -C flag to ssh(1) to enable
compression.
compression.
-c cipher
Selects the cipher to use for encrypting the data transfer.
This option is directly passed to ssh(1).
Selects the cipher to use for encrypting the data transfer.
This option is directly passed to ssh(1).
-F ssh_config
Specifies an alternative per-user configuration file for
ssh. This option is directly passed to ssh(1).
Specifies an alternative per-user configuration file for
ssh. This option is directly passed to ssh(1).
-i identity_file
Selects the file from which the identity (private key) for
RSA authentication is read. This option is directly passed
to ssh(1).
Selects the file from which the identity (private key) for
RSA authentication is read. This option is directly passed
to ssh(1).
-l limit
Limits the used bandwidth, specified in Kbit/s.
-o ssh_option
Can be used to pass options to ssh in the format used in
ssh_config(5). This is useful for specifying options for
which there is no separate scp command-line flag. For full
details of the options listed below, and their possible
values, see ssh_config(5).
Limits the used bandwidth, specified in Kbit/s.
-o ssh_option
Can be used to pass options to ssh in the format used in
ssh_config(5). This is useful for specifying options for
which there is no separate scp command-line flag. For full
details of the options listed below, and their possible
values, see ssh_config(5).
AddressFamily
BatchMode
BindAddress
ChallengeResponseAuthentication
CheckHostIP
Cipher
Ciphers
Compression
CompressionLevel
ConnectionAttempts
ConnectTimeout
ControlMaster
ControlPath
GlobalKnownHostsFile
GSSAPIAuthentication
GSSAPIDelegateCredentials
HashKnownHosts
Host
HostbasedAuthentication
HostKeyAlgorithms
HostKeyAlias
HostName
IdentityFile
IdentitiesOnly
KbdInteractiveDevices
LogLevel
MACs
NoHostAuthenticationForLocalhost
NumberOfPasswordPrompts
PasswordAuthentication
Port
PreferredAuthentications
Protocol
ProxyCommand
PubkeyAuthentication
RekeyLimit
RhostsRSAAuthentication
RSAAuthentication
SendEnv
ServerAliveInterval
ServerAliveCountMax
SmartcardDevice
StrictHostKeyChecking
TCPKeepAlive
UsePrivilegedPort
User
UserKnownHostsFile
VerifyHostKeyDNS
BatchMode
BindAddress
ChallengeResponseAuthentication
CheckHostIP
Cipher
Ciphers
Compression
CompressionLevel
ConnectionAttempts
ConnectTimeout
ControlMaster
ControlPath
GlobalKnownHostsFile
GSSAPIAuthentication
GSSAPIDelegateCredentials
HashKnownHosts
Host
HostbasedAuthentication
HostKeyAlgorithms
HostKeyAlias
HostName
IdentityFile
IdentitiesOnly
KbdInteractiveDevices
LogLevel
MACs
NoHostAuthenticationForLocalhost
NumberOfPasswordPrompts
PasswordAuthentication
Port
PreferredAuthentications
Protocol
ProxyCommand
PubkeyAuthentication
RekeyLimit
RhostsRSAAuthentication
RSAAuthentication
SendEnv
ServerAliveInterval
ServerAliveCountMax
SmartcardDevice
StrictHostKeyChecking
TCPKeepAlive
UsePrivilegedPort
User
UserKnownHostsFile
VerifyHostKeyDNS
-P port
Specifies the port to connect to on the remote host. Note
that this option is written with a capital ?.?. because -p
is already reserved for preserving the times and modes of
the file in rcp(1).
Specifies the port to connect to on the remote host. Note
that this option is written with a capital ?.?. because -p
is already reserved for preserving the times and modes of
the file in rcp(1).
-p Preserves modification times, access times, and modes from
the original file.
the original file.
-q Disables the progress meter.
-r Recursively copy entire directories.
-S program
Name of program to use for the encrypted connection. The
program must understand ssh(1) options.
Name of program to use for the encrypted connection. The
program must understand ssh(1) options.
-v Verbose mode. Causes scp and ssh(1) to print debugging
messages about their progress. This is helpful in debug-
ging connection, authentication, and configuration prob-
lems.
messages about their progress. This is helpful in debug-
ging connection, authentication, and configuration prob-
lems.
DIAGNOSTICS
scp exits with 0 on success or >0 if an error occurred.
scp exits with 0 on success or >0 if an error occurred.
SEE ALSO
rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
ssh_config(5), sshd(8)
rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
ssh_config(5), sshd(8)
HISTORY
scp is based on the rcp(1) program in BSD source code from the
Regents of the University of California.
scp is based on the rcp(1) program in BSD source code from the
Regents of the University of California.
AUTHORS
Timo Rinne ??ri@iki.fi?
Tatu Ylonen ??lo@cs.hut.fi?
Timo Rinne ??ri@iki.fi?
Tatu Ylonen ??lo@cs.hut.fi?
BSD September 25, 1999 BSD
------------------------------------------------------------------------------------
SCP(1) BSD通用命令手册 SCP(1)
名字
安全复制(远程文件复制程序)
------------------------------------------------------------------------------------
SCP(1) BSD通用命令手册 SCP(1)
名字
安全复制(远程文件复制程序)
简介
scp [-1246bcpqrv][-c密码][-f ssh配置][-i标识文件]
[-l限制][-o ssh_选项][-p端口][-s程序]
[[user@]host1:]file1[…][[user@]host2:]file2
描述
SCP在网络上的主机之间复制文件。它使用ssh(1)进行数据传输,
并使用相同的身份验证,并提供与ssh(1)相同的安全性。
与RCP(1)不同,如果认证需要密码或密码,SCP将询问它们。
任何文件名都可以包含主机和用户规范,以指示文件将被复制到该主机或从该主机复制。允许在两个远程主机之间复制。
将源文件复制到已存在的目标文件时,SCP将替换目标文件的内容(保留索引节点)。
如果目标文件尚不存在,将创建一个具有目标文件名的空文件,然后用源文件内容填充。未尝试使用临时文件进行“近原子”传输。
选项如下:
-1 强制SCP使用协议1。
-2 强制SCP使用协议2。
-4 强制SCP仅使用IPv4地址。
-6 强制SCP仅使用IPv6地址。
-B 选择批处理模式(防止询问密码或口令)
-C 压缩启用。将-c标志传递给ssh(1)以启用压缩。
-c 密码
选择用于加密数据传输的密码。此选项直接传递给ssh(1)。
-F 配置SSH
应该提醒用户配置文件通过一个SSH。这个选项是直接传递到SSH的(1)。
-I 身份文件
选择从中读取RSA身份验证标识(私钥)的文件。此选项直接传递给ssh(1)。
-l 限制
限制使用的带宽,以kbit/s为单位。
-o ssh_选项
可用于以ssh_config(5)中使用的格式将选项传递给ssh。这对于指定没有单独SCP命令行标志的选项很有用。
有关下面列出的选项及其可能值的完整详细信息,请参阅ssh_config(5)。
地址族
分批模式
绑定地址
挑战者响应真实性
支票挂钩
密码
密码
压缩
压缩水平
连接尝试次数
连接超时
控制大师
控制路径
Globalknownhosts文件
GSSAPI身份验证
GSSAPIdelegateCredentials公司
哈希姆主机
宿主
主机数据库身份验证
主机密钥算法
主机密钥
主机名
标识文件
仅识别
KBDInteractivedevices公司
对数级
麦克斯
本地主机无主机身份验证
密码提示数
密码验证
端口
首选身份验证
协议
PROXY命令
公钥身份验证
重新限制
Rhostsrsa身份验证
RSA身份验证
森登夫
服务器AliveInterval
服务器alivecountmax
智能卡设备
严格的按键检查
保持活力
使用特权端口
用户
用户知道文件
验证主机密钥DNS
-P 端口
指定要连接到远程主机上的端口。注意这个选项是用大写字母写的吗??。
因为-p已经被保留用于在RCP(1)中保留文件的时间和模式。
-p 保留原始文件中的修改时间、访问时间和模式。
-q 禁用进度表。
-S 程序
用于加密连接的程序名称。程序必须理解ssh(1)选项。
-v 冗长模式。使scp和ssh(1)打印有关进度的调试消息。这有助于调试连接、身份验证和配置问题。
诊断模式
成功时SCP退出0,如果发生错误,则大于0。
scp [-1246bcpqrv][-c密码][-f ssh配置][-i标识文件]
[-l限制][-o ssh_选项][-p端口][-s程序]
[[user@]host1:]file1[…][[user@]host2:]file2
描述
SCP在网络上的主机之间复制文件。它使用ssh(1)进行数据传输,
并使用相同的身份验证,并提供与ssh(1)相同的安全性。
与RCP(1)不同,如果认证需要密码或密码,SCP将询问它们。
任何文件名都可以包含主机和用户规范,以指示文件将被复制到该主机或从该主机复制。允许在两个远程主机之间复制。
将源文件复制到已存在的目标文件时,SCP将替换目标文件的内容(保留索引节点)。
如果目标文件尚不存在,将创建一个具有目标文件名的空文件,然后用源文件内容填充。未尝试使用临时文件进行“近原子”传输。
选项如下:
-1 强制SCP使用协议1。
-2 强制SCP使用协议2。
-4 强制SCP仅使用IPv4地址。
-6 强制SCP仅使用IPv6地址。
-B 选择批处理模式(防止询问密码或口令)
-C 压缩启用。将-c标志传递给ssh(1)以启用压缩。
-c 密码
选择用于加密数据传输的密码。此选项直接传递给ssh(1)。
-F 配置SSH
应该提醒用户配置文件通过一个SSH。这个选项是直接传递到SSH的(1)。
-I 身份文件
选择从中读取RSA身份验证标识(私钥)的文件。此选项直接传递给ssh(1)。
-l 限制
限制使用的带宽,以kbit/s为单位。
-o ssh_选项
可用于以ssh_config(5)中使用的格式将选项传递给ssh。这对于指定没有单独SCP命令行标志的选项很有用。
有关下面列出的选项及其可能值的完整详细信息,请参阅ssh_config(5)。
地址族
分批模式
绑定地址
挑战者响应真实性
支票挂钩
密码
密码
压缩
压缩水平
连接尝试次数
连接超时
控制大师
控制路径
Globalknownhosts文件
GSSAPI身份验证
GSSAPIdelegateCredentials公司
哈希姆主机
宿主
主机数据库身份验证
主机密钥算法
主机密钥
主机名
标识文件
仅识别
KBDInteractivedevices公司
对数级
麦克斯
本地主机无主机身份验证
密码提示数
密码验证
端口
首选身份验证
协议
PROXY命令
公钥身份验证
重新限制
Rhostsrsa身份验证
RSA身份验证
森登夫
服务器AliveInterval
服务器alivecountmax
智能卡设备
严格的按键检查
保持活力
使用特权端口
用户
用户知道文件
验证主机密钥DNS
-P 端口
指定要连接到远程主机上的端口。注意这个选项是用大写字母写的吗??。
因为-p已经被保留用于在RCP(1)中保留文件的时间和模式。
-p 保留原始文件中的修改时间、访问时间和模式。
-q 禁用进度表。
-S 程序
用于加密连接的程序名称。程序必须理解ssh(1)选项。
-v 冗长模式。使scp和ssh(1)打印有关进度的调试消息。这有助于调试连接、身份验证和配置问题。
诊断模式
成功时SCP退出0,如果发生错误,则大于0。
参照
rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
ssh_config(5), sshd(8)
rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
ssh_config(5), sshd(8)
历史
SCP基于加州大学Regents的BSD源代码中的RCP(1)程序。
SCP基于加州大学Regents的BSD源代码中的RCP(1)程序。
作者
Timo Rinne ??ri@iki.fi?
Tatu Ylonen ??lo@cs.hut.fi?
Timo Rinne ??ri@iki.fi?
Tatu Ylonen ??lo@cs.hut.fi?
BSD September 25, 1999 BSD
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------