| Description |
This article describes how to restore the firmware image to the FortiGate via the CLI using the FTP method or from a URL. This is useful in the scenario where the GUI is not accessible, the FortiGate can only be accessed via SSH and console connection and it would be possible to execute a firmware upgrade or downgrade. |
| Scope | FortiGate. |
| Solution |
Be sure to have the FortiGate firewall accessible to the FTP server or the URL that contains the image.
To see all available options to restore image via CLI, type the following command:
execute restore image ? flash <----- Restore image from flash.
execute restore image ftp <path>\<image-name>.out <FTP-IP-address-or-FQDN>[:<FTP-port>] <username> <password>
If nothing is specified in the <FTP-port>, FortiGate uses port 21 to communicate with the FTP server.
execute restore image url <URL-to-the-image> [<image-encryption-passphrase>] [<bypass-signature-and-validity-checking>]
To load the image from a URL, the first optional parameter can be left blank if there is no password to decrypt the image . For the second optional parameter, enter force to bypass any signature and validity-checking. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.