The proxy command controls a connection to two remote systems for transferring files between these two remote systems. A requirement here is that the second remote system supports the PASV or EPSV command.
proxy |
<ftp-command> |
<ftp-command>
Specifies an FTP client command:
In order to establish the control connection to the second system, the first <ftp-command> must be the open command.
When you enter
proxy help
the other FTP commands are shown which can be executed on the secondary connection.
The following commands behave differently if they are prefixed with proxy:
get and mget transfer files from the first server to the second server.
put, mput and append transfer files from the second server to the first server.
The figure below sketches the basic procedure for transferring a file <file> between two remote servers A and B. C is the client.
|
Figure 3: Transferring a file <file> between two remote servers
Example
All files of the ID userid1 on the remote system1 are to be transferred to the ID userid2 on the remote system2.
ftp> open system1 Open control connection to 1st server userid1 . . . . . . . ftp> proxy open system2 Open control connection to 2nd server userid2 . . . . . . . ftp> proxy? Which proxy commands are supported? ftp> proxy mget * Transfer filessystem1 -> system2 ftp> proxy ls Check result ftp> proxy close Close secondary control connection
The status command returns the following output in this case:
ftp> status Connected to PGAB0021, port21. Connected for proxy commands to system2. Passive Mode: off ...