![wget 卡在从 ftp 服务器以匿名身份登录时](https://linux22.com/image/1711514/wget%20%E5%8D%A1%E5%9C%A8%E4%BB%8E%20ftp%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%BB%A5%E5%8C%BF%E5%90%8D%E8%BA%AB%E4%BB%BD%E7%99%BB%E5%BD%95%E6%97%B6.png)
我正在尝试从ftp://ftp.perforce.com使用 wget。我使用以下命令:
wget -t 3 --timeout=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 ping 地址 + 端口 21 会得到以下输出:
[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://用户名:[电子邮件保护]//文件路径/到/文件
希望有帮助:)