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
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://[email protected]/var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso --07:01:35-- `/var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso' => ftp://lab:[email protected]:21/var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso 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://[email protected]/var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso Password for [email protected]: --06:47:29-- `/var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso' => ftp://lab:[email protected]:21/var/tmp/junos-evo-install-ptx-fixed-x86-64-20.4R3.8-EVO.iso
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 10.85.173.152 Connected to 10.85.173.152. 220 another-re0 FTP server (Version 6.00LS) ready. /usr/bin/ftp: /var/home/lab/.netrc: Permission denied Name (10.85.173.152:lab): lab 331 Password required for lab. Password: 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
2021-12-31: Updated PR information for problems with fixes available