我正在嘗試從以下位置下載文件ftp://ftp.perforce.com與 wget 。我正在使用以下命令:
wget -t 3 --超時=10ftp://ftp.perforce //路徑/到/文件
我得到以下輸出:
[xxxx@xxxxxx~]$ wget -t 3 --timeout=10 ftp://ftp.perforce.com/r20.1 /bin.linux26x86_64/p4api-glibc2.12-openssl1.0.2.tgz
--2021-07-17 10:21:10-- ftp://ftp.perforce.com/r20.1/bin.linux26x86_64/p4api-gl
ibc2.12-openssl1.0.2.tgz
=> ‘p4api-glibc2.12-openssl1.0.2.tgz.1’
Resolving ftp.perforce.com (ftp.perforce.com)... 54.177.106.77
Connecting to ftp.perforce.com (ftp.perforce.com)|54.177.106.77|:21... connected .
Logging in as anonymous ...
Error in server response, closing control connection.
Retrying.
增加超時沒有幫助。使用 nmap 對位址 + 連接埠 21 執行 ping 操作會得到下列輸出:
[xxx@xxxx~]$ nmap -p 21 ftp.perforce.com
Starting Nmap 6.40 ( http://nmap.org ) at 2021-07-17 10:24 CEST
Nmap scan report for ftp.perforce.com (54.177.106.77)
Host is up (0.15s latency).
rDNS record for 54.177.106.77: ec2-54-177-106-77.us-west-1.compute.amazonaws.com
PORT STATE SERVICE
21/tcp open ftp
Nmap done: 1 IP address (1 host up) scanned in 0.67 seconds
我正在使用 RHEL 7.9
我缺什麼?
答案1
如果沒有看到實際的伺服器配置+哪些使用者可用/密碼設置,很難說。最安全的選擇是將使用者名稱+密碼新增至命令中,例如 fe:
wget -t 3 --timeout=10 ftp://用戶名:[電子郵件受保護]//路徑/到/文件
希望有幫助:)