Using scp2

Connectivity Secure Shell

Using scp2

Hummingbird scp2 (Secure Copy) is a command line program used to secure file transfers over a network using the SSH2 protocol. Two methods of authentication are supported: password and public key.

The following information is also available from the scp2 usage information (scp2 –h):

scp2 usage:

scp2 [-aBCdhIpQqruV] [--auto] [--bin] [-b buffer-size] [-c cipher]
     [-g fingerprint] [-m mask] [--overwrite[=no]]
     [-P ssh2-port] [--SKA action] [--tracefile file] [-T level]
     [[user[#password]@]host[#port]:]file ...
     [[user[#password]@]host[#port]:]file_or_dir

Option

Action

-a

Transfer files in ascii mode.

--auto

Automatically select transfer type.

--bin

Transfer files in binary mode (default).

-B

Set batch-mode on.

-b buffer-size

Define maximum buffer size for one request. Default is 32768 bytes.

-C

Set compression on. Default is off.

-c cipher

Select encryption algorithm. Multiple -c options are allowed, and a single -c flag can have only one cipher.

-d

Force target to be a directory.

-g fingerprint

Select user key to use for authentication.

-h

Display help.

-I

Display interactive prompt before overwriting.

-m mask

Set the default file permission mask.

--overwrite

Overwrite files (default).

-p ssh2-port

Indicate the remote ports on which sshd2 listens.

-p

Preserve file attributes and timestamps.

-Q

Suppress progress indicator.

-q

Make scp quiet (only fatal errors are displayed).

-r

Recurse subdirectories.

--SKA action

Indicate server key action:

0—Prompt (default)

1—Add key and connect

2—Do not add key and connect

3—Deny connection

-T level

Indicate trace level:

1—Basic

2—detailed

3—Verbose (default)

--tracefile file

Indicate the name of the trace file.

-u

Remove source files after copying.

-v

Display version.

Notes on selected options:

-B  Batch mode is used for scripting file transfers. With this option, scp2 cannot stop execution for any reason. Therefore, all authentication information must be present on the command line or the transfer will fail.

-g fingerprint  Scp2 uses the keys you create in Connectivity Secure Shell. You can view the value of the fingerprint in the Key Information dialog box accessible from the User Keys pane in the Connectivity Secure Shell Console.

-m mask  This is the 3-number file permission mask. The first number corresponds to the owner of the file (you), the second corresponds to groups you might have created, and the third is for the general public. Each of the three numbers ranges from 0 to 7 and correspond to a bit-style flag-addition for [Read, Write, Execute], Read being in the most significant binary position, its value is 4, Write=2, and Execute=1. Thus, adding up the values gives full permission =7. Turning them all off means no permissions are given =0.

-r  When the source is a directory, use this option to copy its subtrees.

--SKA  Scp2 is considered the client to an SSH2 server. When connecting to this server, the server sends its certificate to scp2. This allows scp2 to determine if it’s safe to connect to this server. The server key action is an issue only when a server’s key is not already added to Connectivity Secure Shell’s Server Key store. What to do with this new server key is up to the user. The values are:

0—for prompting the user with the server certificate fingerprint

1—for connect and adding the key without prompting

2—for connecting without adding the key

3—for deny connection if the key is not already found in the store

If you choose to connect without being prompted for a server key, you will not have the opportunity to authenticate the server you are connecting to. Your safest option is to be prompted so that you can verify the server certificate's fingerprint.

--tracefile file  Creates 2 files. One is for the FTP protocol trace events, and one for the SSH2 protocol events. Both protocols are used in Hummingbird Scp2.