scp

Command

In non-FIPS mode:

scp [ ipv6 ] server [ port-number ] { get | put } source-file-path [ destination-file-path ] [ identity-key { dsa | ecdsa | rsa } | prefer-ctos-cipher { 3des | aes128 | des } | prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange | dh-group1 | dh-group14 } | prefer-stoc-cipher { 3des | 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 { ecdsa | 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 want to specify an IPv4 server, do not specify this keyword.

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 a public key algorithm. The default is dsa in non-FIPS mode and rsa in FIPS mode. If the server uses publickey authentication, you must specify this keyword. The client generates the digital signature by using the local private key that is associated with the algorithm.

prefer-ctos-cipher: Specifies the preferred encryption algorithm from client to server. The default is aes128.

prefer-ctos-hmac: Specifies the preferred HMAC algorithm from client to server. The default is 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.

prefer-stoc-cipher: Specifies the preferred encryption algorithm from server to client. The default is aes128.

prefer-stoc-hmac: Specifies the preferred HMAC algorithm from server to client. The default is sha1-96.

username username password password: Specifies the username and the password of the client. The username username option specifies the username of the client and is a case-sensitive string of 1 to 80 characters. The password password option specifies the password of the client in plain text and is a string of 1 to 63 characters.

Description

Use scp to transfer files with an SCP server.

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