HP TCP/IP Services for OpenVMS Guide to SSH |
SSH Command Reference |
|
|
| |
SCP (or SCP2)SFTP (or SFTP2)Using the
SCP Command ![]()
The SCP command securely copies files between a Secure Shell
client and server. This command is intended as a secure replacement
for the rcp command. When the user enters the SCP command, the client
establishes an SSH session. If authentication succeeds and the user's
identity has been accepted by the server, the server executes the
command. All communication is automatically encrypted. The session
terminates when the command completes. The SCP command does not
require special privileges.
SCP [-D debug_level] [-d] [-q] [-Q] [-p] [-u] [-v] [-h] [-r] [-k] [-B] [-a] [-v] [-1] [-c cipher] [-S ssh-path] [-P ssh-port] [-o ssh-option] [-b] [-N] [-V] [-h]source-name destination-name
Parameters ![]()
source-name specifies the file to be copied.
destination-name specified the location and file name for the copied file.
The general format for the source and destination name is user@host#port:[directory]file-name. You can copy files or entire directories.
Options ![]()
You can use the options in
SCP Command Options with the SCP command.
| Option | Description |
|---|---|
|
-D debug-level
|
Displays debug information to SYS$OUTPUT.
The debug-level is a number between 0 and 99,
where 99 specifies that all debug information should be displayed.
|
|
-d
|
Makes sure that the destination-name parameter
is a directory. If not, the SCP command exits with an error message. |
|
-q |
Makes SCP quiet (only fatal errors are displayed). |
|
-Q
|
Suppresses the progress indicator.
|
|
-p
|
Preserves file attributes and timestamps.
|
|
-u
|
Removes source files after copying.
|
|
-k
|
Replaces files of the same name at the
destination. This option applies to SSH for OpenVMS servers only.
|
|
-B
|
Sets batch mode on.
|
|
-r
|
Recurses subdirectories.
|
|
-a
|
Transfers files in ASCII mode.
|
|
-v
|
Displays information in verbose mode.
This is equal to specifying the -D 2 option.
|
|
-c cipher
|
Specifies the encryption algorithm to use.
See the ciphers keyword in the client configuration file for more
information (Appendix B). Each -c option can
specify only one cipher; multiple -c options
are allowed. |
|
-S ssh-path
|
Specifies an alternate location for the
SSH server executable file.
|
|
-P ssh-port
|
Tells SCP which port the SSH server listens
on.
|
|
-o ssh-option
|
Specifies client configuration options
that override any options specified in the client configuration
file (see
SSH Client and Server Configuration Files).
|
|
-b
|
Defines the maximum buffer size for one
request (default is 2048 bytes).
|
|
-N
|
Defines the maximum buffer size of concurrent
requests (default is 10).
|
|
-V
|
Displays the version of SSH.
|
|
-h
|
Displays information about using the
SCP utility.
|
Example ![]()
The following example shows how to copy files from a local
system FILE.TXT to a remote system (VMSHOST) and into the directory
[MYDIR].
$ SCP FILE.TXT KATHY@VMSHOST:DSK0:[MYDIR]The following example shows how to copy FILE.TXT from a remote system (VMSHOST) to a local system and renaming it to LOCAL_FILE.TXT:
$ SCP KATHY@VMSHOST:DSK0:[MYDIR]FILE.TXT LOCAL_FILE.TXT
Using the
SFTP Command ![]()
You can use the SFTP command on a client to copy files to
and from a server. Some SFTP commands and syntax are similar to
those for the FTP command, but SFTP does not use the FTP server
or the FTP client for its connections. The SFTP command runs with
normal user privileges.
SFTP [-D ] [-b batchfile] [-S path][-h][-v] [-P sshFor more details about SFTP commands, enter-port] user@host
help or help topic at the sftp> prompt. For example, to find more information about the open command, enter the following command:sftp> help open
Parameters ![]()
The user@host parameter specifies the user name and host name
of the destination for the file transfer.
Options
You can use the options in SFTP Command Options with the SFTP command.
$ SFTP sftp>
|
|