Transfer Files to Juniper Firewall

I recently had to try to work out how to transfer files onto a Juniper SRX Firewall ahead of an upgrade, after much digging, testing and head scrating determined that the below worked (for me at least)

TFTP

FWHostname>start shell

% tftp 10.1.1.1

tftp> get <filename> /cf/var/tmp/<filename>

Note that when you complete the above doesn’t show any progress bar or update just sits there until you get the below:

Recieved 248719832 bytes in 440.9 seconds

SCP

GaryM@Juniper-FW-1> start shell
%
%
% scp GaryM@10.1.1.1:/junos-srxsme-15.1X49-D220.2-domestic.tgz /cf/var/tmp/junos-srxsme-15.1X49-D220.2-domestic.tgz
The authenticity of host '10.1.1.1 (10.1.1.1)' can't be established.
RSA key fingerprint is SHA256:A3lPHo+Z1uOh7expLsczAPGRoBxxxxxxHcG+QPIST3A.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.1.1.1' (RSA) to the list of known hosts.
GaryM@10.1.1.1's password:
junos-srxsme-15.1X49-D220.2-domestic.tgz                                                                                                  100%  248MB   3.0MB/s   01:22
%

Use the above line to copy the file junos-srxsme-15.1×49-D220.2-domestic.tgz file from SCP Source to the local directory /cf/var/tmp/.

This has the bonus over the TFTP of providing a progress bar at the bottom of the output that updates during upload.

To confirm file uploaded from Shell do the below

tftp>quit

% cd /cf/var/tmp/

% ls

To confirm file upload from the CLI do the below:

% CLI

FWHostname> file list

Gary M