Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[EVO] File copy to FTP server using CLI "file copy" command not working



Article ID: KB37561 KB Last Updated: 31 Dec 2021Version: 2.0

This article provides a workaround in case file copy to the FTP server via CLI does not work on devices that are running Junos EVO version 20.2R2-S1.5.


In Junos EVO version 20.2R2-S1.5, file copy by using the Command Line Interface (CLI) does not work. The file copy command results in login failure even though a correct syntax has been used, whereas the same command works in later releases such as Junos OS software version 20.4R3.8-EVO.

File Copy to FTP in Junos 20.2R2-S1.5-EVO Fails

--- JUNOS 20.2R2-S1.5-EVO Linux (none) 4.8.28-WR2.2.1_standard-ga95c0d7 #1 SMP PREEMPT Tue Jan 5 00:47:33 PST 2021 x86_64 x86_64 x86_64 GNU/Linux

lab@router> file copy /var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso ftp://lab@
--07:01:35-- `/var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso'
    => ftp://lab:xxxxx@
Error: Login-Sequence failed (Login incorrect.)
Skipping all files from this account...
error: put-file failed
error: could not send local copy of file

File Copy to FTP in Junos 20.4R3.8-EVO Succeeds

lab@router> file copy /var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso ftp://lab@ 
Password for lab@
--06:47:29-- `/var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso'
    => ftp://lab:xxxxx@

As a workaround, log in to the shell and connect to the FTP server before copying the file. Use the following command:

lab@router> start shell 
[vrf:none] lab@router:/$ /usr/libexec/ui/evo_ftp
ftp> open
Connected to
220 another-re0 FTP server (Version 6.00LS) ready.
/usr/bin/ftp: /var/home/lab/.netrc: Permission denied
Name ( lab
331 Password required for lab.
230 User lab logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /var/tmp
250 CWD command successful.
ftp> put <file name>
200 PORT command successful.
150 Opening BINARY mode data connection for 'init'.
226 Transfer complete.
30514 bytes sent in 0.00109 seconds (26.8 Mbytes/s)
ftp> bye
A couple of PRs that provide resolutions depending on the nature of the problem (in-band FTP transfer, user/password issue) include: PR1561146 and PR1587646.
Modification History:

2021-12-31: Updated PR information for problems with fixes available

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search