How do I set up a Windows SSH server with keys in order to backup my Smoothwall configuration?

Article #: Product Castle


The scheduler found in System > Maintenance > Scheduler can be used to setup a weekly push of a backup archive to a third party SSH server. However, when using a Windows server as the third party backup destination, the free application WinSCP is an easier option to use for pulling a weekly backup from the Smoothwall.


How do I set up a Windows SSH server with keys in order to backup my Smoothwall configuration?

To do this you will need WinSCP installed from

Note: WinSCP is a third party piece of software which allows file transfer over the SSH Protocol.


The process is to install WinSCP and then create a batch file that can be run on a weekly schedule. The batch file will instruct WinSCP to connect to the Smoothwall and synchronize the content of the folder where the backup archives are stored on the Smoothwall to a local folder.

  1. Download and install WinSCP to the required server.
  2. Create a batch file containing the following information:
  3. @echo off

    set RootPW="password"

    set Host="Smoothwall_IP"

    set LocalDir="directory_path"

    set RemoteDir="/var/archive"

    "c:\Program Files\WinSCP\WinSCP.exe" /console /command "open scp://root:%RootPW%@%Host%:222" "synchronize local -criteria=either %LocalDir% %RemoteDir%" "exit"


    • password is the root password of the Smoothwall
    • Smoothwall_IP is the Smoothwall's internal IP address the Windows server connect to
    • directory_path is the full path of the local directory on the Windows server where the backups should be copied to, for example, c:\backup\swbackup\
    • Leave RemoteDir as /var/archive as this is the path to the directory on the Smoothwall where the backups are stored
  4. Save the file with a .bat file extension.
  5. On the Smoothwall, create a backup archive of all system settings. Ensure the automatic backup option is enabled. See
  6. On the Smoothwall, create a schedule to prune the archives — see
  7. This will instruct the Smoothwall to make a backup on a weekly basis on the day and hour set, as well as create a backup archive when the system is rebooted. The pruning will insure that only the latest backup archives are retained.

  8. Finally, use Task Scheduler on the Windows server to run the backup script on the same day the Smoothwall automatic backup is taken BUT at an hour later.


Last updated: Author: Contributions by:
23 August 2016   DMT