The file download sftp command downloads portal page and image resource files or app files from an SFTP server.
file download sftp [ source-interface interface-type interface-number ] server-address [ port server-port ] user-name password { file-name [ to folder-name ] | app app-name }
| Parameter | Description | Value |
|---|---|---|
| interface-type interface-number | Specifies the type and number of the source interface sending packets. |
- |
| server-address | Specifies the IP address or host name of the SFTP server. | - |
| server-port | Specifies the port number of the SFTP server. |
The value is 22 or an integer ranging from 1025 to 65535. The default value is 31922. |
| user-name | Specifies the user name for logging in to the SFTP server. | - |
| password | Specifies the password for logging in to the SFTP server. | - |
| file-name | Specifies the name of the file to be downloaded from the SFTP server. Only the USG6510E/6510E-POE/6530E supports this parameter. |
The value is a string of 1 to 100 characters. |
| folder-name | Specifies the name of a local folder. Only the USG6510E/6510E-POE/6530E supports this parameter. |
The value is a string of 1 to 15 characters. |
| app-name | Specifies the name of an app file to be deleted. |
The value is a string of 1 to 64 characters. |
To download portal page and image resource files, if to folder-name is not specified, the portal page and image resources are downloaded to the download folder in the root directory (hda1:/) of the CF card by default. If to folder-name is specified, the portal page and image resources are downloaded to the hda1:/download/folder-name directory.
If folder-name is not specified in the portal-page-folder command, to folder-name does not need to be specified in the file download sftp command. If folder-name is specified in the portal-page-folder command, to folder-name needs to be specified in the file download sftp and is consistent with folder-name in the portal-page-folder command.
Each web page to be downloaded must not exceed 64 KB; each image to be downloaded must not exceed 1 MB. Otherwise, the resource file cannot be downloaded.
Currently, the following file types are supported: access.html, survey.html, logon.html, timeout.html, overload.html, reintentar.html, *.bmp, *.jpeg, *.jpg, *.gif, and *.png.
A maximum of 10 .html and 20 image files can be downloaded.
To download app files, note that the size of each app file cannot exceed 60 MB, and a maximum of three app files can be downloaded. The files are downloaded to the portaldownload folder on the CF card, and the path cannot be specified.
If the correct user name and password are used but file downloading fails, the device might have been locked because incorrect user names and passwords are used before. You can try again later.
You are not advised to use FTP to upload resource files to the portaldownload folder on the CF card of the FW. The resource customization list displays a maximum of three files. If more than three files are uploaded through FTP, only three of them are displayed.
# Download the portal page from the SFTP server at 10.10.10.100 to a local folder.
<sysname> system-view [sysname] file download sftp 10.10.10.100 port 22 admin Changme123 access.html to local
# Download test.apk from the SFTP server at 10.10.10.100.
<sysname> system-view [sysname] file download sftp 10.10.10.100 port 22 admin Changme123 app test.apk