116
Usage guidelines
FTP can operate in either of the following modes:
• Active mode—The FTP server initiates the TCP connection.
• Passive mode—The FTP client initiates the TCP connection.
When the FTP operation mode is passive, executing this command changes the mode to active.
When the FTP operation mode is active, executing this command changes the mode to passive.
This command is typically used together with a firewall to control FTP session establishment
between private network users and public network users.
Examples
# Change the FTP operation mode to passive.
ftp> passive
Passive mode on.
ftp> passive
Passive mode off.
put
Use put to upload a file from the FTP client to the FTP server.
Syntax
put localfile [ remotefile ]
Views
FTP client view
Predefined user roles
network-admin
Parameters
localfile: Specifies the local file to be uploaded.
remotefile: Specifies the name of the file for saving the uploaded file on the FTP server.
Usage guidelines
You can perform this operation only after you log in to the FTP server.
To upload a file in the current working directory, specify a file name without the path for the localfile
argument, for example, a.cfg.
To upload a file in some other directory, specify a fully qualified file name for the localfile argument,
for example, flash:/subdirectory/a.cfg.
Examples
# Upload the a.txt file from the local working directory to the FTP server. Save the file as b.txt.
ftp> put a.txt b.txt
local: a.txt remote: b.txt
150 Connecting to port 47461
226 File successfully transferred
1569 bytes sent in 0.000671 seconds (2.23 Mbyte/s)
# Upload the a.txt file from the test directory of the local working directory to the FTP server. Save
the file as b.txt.
ftp> put flash:/test/a.txt b.txt