wget无法从我的VPS(未经授权的401)进行身份验证和下载文件,但可以从我的笔记本电脑linux终端进行下载。如何解决?

时间:2018-08-03 00:48:52

标签: authentication download wget

我已经花了几个小时在许多网站上搜寻,但我无法修复我。希望有人可以在这里为我提供帮助:

LAPTOP(文件下载成功,没有问题):

wget -d http://EXAMPLE.COM:80/movie/USERNAME/PASSWORD/video.mkv
DEBUG output created by Wget 1.17.1 on linux-gnu.

Reading HSTS entries from /home/mylinuxuser/.wget-hsts
URI encoding = ‘UTF-8’
--2018-08-03 01:30:35--  http://EXAMPLE.COM/movie/USERNAME/PASSWORD/video.mkv
Resolving EXAMPLE.COM (EXAMPLE.COM)... SOME_IP_ADDRESS, DIFFERENT_IP_ADDRESS
Caching EXAMPLE.COM => SOME_IP_ADDRESS DIFFERENT_IP_ADDRESS
Connecting to EXAMPLE.COM (EXAMPLE.COM)|SOME_IP_ADDRESS|:80... connected.
Created socket 3.
Releasing 0x0000558aa8dbba40 (new refcount 1).

---request begin---
GET /movie/USERNAME/PASSWORD/video.mkv HTTP/1.1
User-Agent: Wget/1.17.1 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: EXAMPLE.COM
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response... 
---response begin---
HTTP/1.1 302 Found
Server: nginx/1.14.0
Date: Fri, 03 Aug 2018 00:14:42 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
Location: http://ANOTHER_IP_ADDRESS:80/movie/USERNAME/PASSWORD/video.mkv?token=SxoOVkYKEF4WAAcAU1ZTBlBRUFMKBgBUUlFSBQgHAQkBClNVAVoEAVYXGkEVQRYGAAtuCFdHCgddV1wGHEFESlVKOV5RQAhGDA0OUVMDRk9DElgMVkcKB1BSVwUGUAIAAxRER1wGEF4WBgdXXgNGT0MDSRVWF15XCT4AUkYKUlwSAkQVGUBdCmtRUw4HWwBBW0QBQx9HWUUVQ14VcwJDSVhXCFIVNVMWUV1ZFhVQRCETCVAFUQReUkUyAUVGClJcQxpKFVcLRhZVQVNBXBdWUFBXE00RBl9DCxUWThJZE35yGkoVUBpGAVpGXwwIF15BDA1HQx9HWUU6EwFERBFUWF1dFBUPQAJGGBdbAh5qBwwPCFQCRwxfWBZDXhUBQR0bXVcIXkENQDtEXFJBXFsRDw0b

---response end---
302 Found
Registered socket 3 for persistent reuse.
URI content encoding = ‘UTF-8’
Location: http://ANOTHER_IP_ADDRESS:80/movie/USERNAME/PASSWORD/video.mkv?token=SxoOVkYKEF4WAAcAU1ZTBlBRUFMKBgBUUlFSBQgHAQkBClNVAVoEAVYXGkEVQRYGAAtuCFdHCgddV1wGHEFESlVKOV5RQAhGDA0OUVMDRk9DElgMVkcKB1BSVwUGUAIAAxRER1wGEF4WBgdXXgNGT0MDSRVWF15XCT4AUkYKUlwSAkQVGUBdCmtRUw4HWwBBW0QBQx9HWUUVQ14VcwJDSVhXCFIVNVMWUV1ZFhVQRCETCVAFUQReUkUyAUVGClJcQxpKFVcLRhZVQVNBXBdWUFBXE00RBl9DCxUWThJZE35yGkoVUBpGAVpGXwwIF15BDA1HQx9HWUU6EwFERBFUWF1dFBUPQAJGGBdbAh5qBwwPCFQCRwxfWBZDXhUBQR0bXVcIXkENQDtEXFJBXFsRDw0b [following]
] done.
URI content encoding = None
--2018-08-03 01:30:36--  http://ANOTHER_IP_ADDRESS/movie/USERNAME/PASSWORD/video.mkv?token=SxoOVkYKEF4WAAcAU1ZTBlBRUFMKBgBUUlFSBQgHAQkBClNVAVoEAVYXGkEVQRYGAAtuCFdHCgddV1wGHEFESlVKOV5RQAhGDA0OUVMDRk9DElgMVkcKB1BSVwUGUAIAAxRER1wGEF4WBgdXXgNGT0MDSRVWF15XCT4AUkYKUlwSAkQVGUBdCmtRUw4HWwBBW0QBQx9HWUUVQ14VcwJDSVhXCFIVNVMWUV1ZFhVQRCETCVAFUQReUkUyAUVGClJcQxpKFVcLRhZVQVNBXBdWUFBXE00RBl9DCxUWThJZE35yGkoVUBpGAVpGXwwIF15BDA1HQx9HWUU6EwFERBFUWF1dFBUPQAJGGBdbAh5qBwwPCFQCRwxfWBZDXhUBQR0bXVcIXkENQDtEXFJBXFsRDw0b
conaddr is: SOME_IP_ADDRESS
Releasing 0x0000558aa8dbe590 (new refcount 0).
Deleting unused 0x0000558aa8dbe590.
Connecting to ANOTHER_IP_ADDRESS:80... connected.
Created socket 4.
Releasing 0x0000558aa8dbe590 (new refcount 0).
Deleting unused 0x0000558aa8dbe590.

---request begin---
GET /movie/USERNAME/PASSWORD/video.mkv?token=SxoOVkYKEF4WAAcAU1ZTBlBRUFMKBgBUUlFSBQgHAQkBClNVAVoEAVYXGkEVQRYGAAtuCFdHCgddV1wGHEFESlVKOV5RQAhGDA0OUVMDRk9DElgMVkcKB1BSVwUGUAIAAxRER1wGEF4WBgdXXgNGT0MDSRVWF15XCT4AUkYKUlwSAkQVGUBdCmtRUw4HWwBBW0QBQx9HWUUVQ14VcwJDSVhXCFIVNVMWUV1ZFhVQRCETCVAFUQReUkUyAUVGClJcQxpKFVcLRhZVQVNBXBdWUFBXE00RBl9DCxUWThJZE35yGkoVUBpGAVpGXwwIF15BDA1HQx9HWUU6EwFERBFUWF1dFBUPQAJGGBdbAh5qBwwPCFQCRwxfWBZDXhUBQR0bXVcIXkENQDtEXFJBXFsRDw0b HTTP/1.1
User-Agent: Wget/1.17.1 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: ANOTHER_IP_ADDRESS
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response... 
---response begin---
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 03 Aug 2018 00:29:53 GMT
Content-Type: video/x-matroska
Content-Length: 2071078584
Connection: keep-alive
Accept-Ranges: 0-2071078584
Content-Range: bytes 0-2071078583/2071078584

---response end---
200 OK
Disabling further reuse of socket 3.
Closed fd 3
Registered socket 4 for persistent reuse.
Length: 2071078584 (1.9G) [video/x-matroska]
Saving to: ‘video.mkv’

VPS(它不会下载任何内容,如下所示):

wget -d http://EXAMPLE.COM:80/movie/USERNAME/PASSWORD/video.mkv
DEBUG output created by Wget 1.19.4 on linux-gnu.

Reading HSTS entries from /root/.wget-hsts
URI encoding = ‘UTF-8’
Converted file name 'video.mkv' (UTF-8) -> 'video.mkv' (UTF-8)
--2018-08-03 00:35:19--  http://EXAMPLE.COM/movie/USERNAME/PASSWORD/video.mkv
Resolving EXAMPLE.COM (EXAMPLE.COM)... SOME_IP_ADDRESS, DIFFERENT_IP_ADDRESS
Caching EXAMPLE.COM => SOME_IP_ADDRESS DIFFERENT_IP_ADDRESS
Connecting to EXAMPLE.COM (EXAMPLE.COM)|SOME_IP_ADDRESS|:80... connected.
Created socket 3.
Releasing 0x0000561201148270 (new refcount 1).

---request begin---
GET /movie/USERNAME/PASSWORD/video.mkv HTTP/1.1
User-Agent: Wget/1.19.4 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: EXAMPLE.COM
Connection: Keep-Alive
Referer: EXAMPLE.COM

---request end---
HTTP request sent, awaiting response... 
---response begin---
HTTP/1.1 401 Unauthorized
Server: nginx/1.14.0
Date: Fri, 03 Aug 2018 00:19:26 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *

---response end---
401 Unauthorized
Registered socket 3 for persistent reuse.
] done.

Username/Password Authentication Failed.

有人知道我应该在VPS中运行什么命令,或者应该安装什么其他命令才能下载文件?

0 个答案:

没有答案