Copying Files
You can use the following Secure Shell commands to copy files between clients and servers:
You can use SCP and SFTP to copy files of the following types:
Files that are indexed or relative cannot be copied directly. To transfer indexed files:
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.
source-name specifies the file to be copied, in the following format: destination-name specified the location and file name for the copied file. The general format for the source and destination name is as follows: user@host#port :[directory]file-name You can copy files or entire directories. Table 7–1 describes the options in you can use with the SCP command. Table 7-1 SCP Command Options
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:
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. SFTP [-D debug_level_spec][-B batchfile] [-S path][-h] [-V] [-P ssh-port] [b buffer_size] [-4] [-6][-o ssh_option] user@host For more details about SFTP commands, enter the help or help topic command at the sftp> prompt. For example, to find more information about the open command, enter the following command:
The user@host parameter specifies the user name and host name of the destination for the file transfer. Table 7–2 describes the options you can use with the SFTP command. Table 7-2 SFTP Command Options
|