scp
Command
In non-FIPS mode:
scp [ ipv6 ] server [ port-number ] { get | put } source-file-path [ destination-file-path ] [ identity-key { dsa | rsa } | prefer-ctos-cipher { aes128 | des } | prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange | dh-group1 | dh-group14 } | prefer-stoc-cipher { aes128 | des } | prefer-stoc-hmac { md5 | md5-96 | sha1 | sha1-96 } | username username password password ] *
In FIPS mode:
scp [ ipv6 ] server [ port-number ] { get | put } source-file-path [ destination-file-path ] [ identity-key rsa | prefer-ctos-cipher { aes128 | aes256 } | prefer-ctos-hmac { sha1 | sha1-96 } | prefer-kex dh-group14 | prefer-stoc-cipher { aes128 | aes256 } | prefer-stoc-hmac { sha1 | sha1-96 } | username username password password ] *
View
User view
Default level
3: Manage level
Parameters
ipv6: Specifies the type of the server as IPv6. If you do not specify this keyword, IPv4 server is used.
server: Specifies an IPv4 or IPv6 server by its address or host name. For an IPv4 server, it is a case-insensitive string of 1 to 20 characters. For an IPv6 server, it is a case-insensitive string of 1 to 46 characters.
port-number: Specifies the port number of the server, in the range of 0 to 65535. The default is 22.
identity-key: Specifies the algorithm for publickey authentication, either dsa or rsa. The default is dsa.
dsa: Specifies the public key algorithm dsa.
rsa: Specifies the public key algorithm rsa.
prefer-ctos-cipher: Specifies the preferred encryption algorithm from client to server, defaulted to aes128.
aes128: Specifies the encryption algorithm aes128-cbc.
aes256: Specifies the encryption algorithm aes256-cbc.
des: Specifies the encryption algorithm des-cbc.
prefer-ctos-hmac: Specifies the preferred HMAC algorithm from client to server, defaulted to sha1-96.
md5: Specifies the HMAC algorithm hmac-md5.
md5-96: Specifies the HMAC algorithm hmac-md5-96.
sha1: Specifies the HMAC algorithm hmac-sha1.
sha1-96: Specifies the HMAC algorithm hmac-sha1-96.
prefer-kex: Specifies the preferred key exchange algorithm. The default is dh-group-exchange in non-FIPS mode and is dh-group14 in FIPS mode.
dh-group-exchange: Specifies the key exchange algorithm diffie-hellman-group-exchange-sha1.
dh-group1: Specifies the key exchange algorithm diffie-hellman-group1-sha1.
dh-group14: Specifies the key exchange algorithm diffie-hellman-group14-sha1.
prefer-stoc-cipher: Specifies the preferred encryption algorithm from server to client, defaulted to aes128.
prefer-stoc-hmac: Specifies the preferred HMAC algorithm from server to client, defaulted to sha1-96.
username username password password: Specifies the username and the password that are used to log in to the SCP server. The username argument specifies a username. It is a case-sensitive string of 1 to 80 characters. The password argument specifies a password in plain text. It is a string of 1 to 63 characters.
Description
Use scp to transfer files with an SCP server.
When the server adopts publickey authentication to authenticate a client, the client needs to get the local private key for digital signature. As the publickey authentication uses either RSA or DSA algorithm, you must specify an algorithm for the client (by using the identity-key keyword) in order to get the correct data for the local private key.
Examples
# Connect to the SCP server 192.168.0.1, download the file remote.bin from the SCP server, save it locally and change the file name to local.bin
<Sysname> scp 192.168.0.1 get remote.bin local.bin