Views:



Article #: KA-04132
Published: 9th Jan 2026

Last reviewed: 9th Jan 2026

How to upload a configuration file to multiple PDUs via FTPs

 
  1. Introduction
  2. Purpose
  3. Requirements
  4. Procedure
  5. Scripted
 

Introduction

Sometimes it might be necessary to upload/update a configuration file (conf.ini) to multiple PDUs via FTPs. While updating a configuration can be done with the GUT tool or the site command utility (windows only), often times due to data center policies, this may not be feasible, therefore this must be done via alternate methods using a Linux server.

Purpose

The purpose of this article is to provide the end-user with a working example of scripting methods to upload a configuration file to multiple PDUs via FTPs

Requirements

  • Applies to any G5 & G6 Panduit PDU (Any firmware version)
  • Enabled FTPs Access on the PDU
  • Linux OS (most distributions will work)
  • Lftp (installed on the linux workstation) – FTPs utility
 

Procedure

The script uploads a configuration file (conf.ini) via FTPs to multiple PDUs sequentually, it does this by reading a list of PDUs (IP addresses) one by one. As a requirement, the scipt also creates the configuration folder in the PDU where the configuration file is placed (conf); after creating the folder and uploading the configuration file, the script then moves on to the next PDU and so on. Body of script below, feel free to copy and paste into your application.
#!/usr/bin/ksh

USER="admin"
PASSWORD="PanPass"
CONF="/sources/conf.ini"
PDU_LIST=/sources/g5Pdulist.txt

MPUT="mput"
LS="ls -ltr"
RM="rm"
CD="cd"
DIR="conf"
MKDIR="mkdir -p "

for PDU_IP in `cat $PDU_LIST`
do
 lftp -c  'set ftp:ssl-allow true;
             set ssl:verify-certificate no;
              set ftp:use-feat false;
                open -u '$USER','$PASSWORD' -e " '"$MKDIR"' '"$DIR"'; '"$CD"' '"$DIR"'; '"$MPUT"' '"$CONF"'; '"$LS"' " '$PDU_IP''
  echo "File: "$CONF " Uploaded to PDU: "$PDU_IP
done