Juniper 中的 FTP 文件复制命令显示 [错误:文件获取失败错误:无法获取文件的本地副本]?

网络工程 瞻博网络
2021-07-24 22:38:17

我有两台 Juniper ACX 2200 系列路由器背对背连接,一台路由器运行最新操作系统,但其他路由器运行旧操作系统,

我想将最新的操作系统从一个 Junos 复制到另一个 Junos 路由器,

我在两个路由器上都启用了 FTP

[edit system services ftp]
set rate-limit 2
set connection-limit 2

并使用了命令

ikar@hostname> file copy ftp://ikar:ikar123@172.22.36.113/var/tmp/jinstall-ppc-15.1X54-D36.2-domestic.tgz /var/tmp

我得到了以下错误

fetch: ftp://ikar:*@172.22.36.113/var/tmp/jinstall-ppc-15.1X54-D36.2-domestic.tgz: File unavailable (e.g., file not found, no access)
error: file-fetch failed
error: could not fetch local copy of file

用户:ikar 拥有超级用户权限。

2个回答

如果您在获取 URL 时遇到问题,请跳转到 FreeBSD shell(使用“start shell”)并从那里执行 ftp:

user@router> start shell
% ftp 192.168.254.254
Connected to 192.168.254.254.
220 router FTP server (Version 6.00LS) ready.
Name (192.168.254.254:user): user
331 Password required for user.
Password:
230 User user logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bin
200 Type set to I.
ftp> get <file>

尝试:

ikar@hostname> file copy ftp://ikar@172.22.36.113/var/tmp/jinstall-ppc-15.1X54-D36.2-domestic.tgz /var/tmp

系统会提示您输入密码,输入密码即可

(来源:http : //www.juniper.net/documentation/en_US/junos15.1/topics/reference/command-summary/file-copy.html#jd0e160