通过EC2实例之间的SSH隧道使用socks代理进行卷曲失败:“;curl:(7)未能接收SOCKS5连接请求确认。”;

通过EC2实例之间的SSH隧道使用socks代理进行卷曲失败:“;curl:(7)未能接收SOCKS5连接请求确认。”;,curl,amazon-ec2,ssh,proxy,socks,Curl,Amazon Ec2,Ssh,Proxy,Socks,在AWS中通过两个EC2实例之间的简单SSH隧道设置socks代理时,我看到了curl问题 box1 $ ssh -v -D 12345 ubuntu@box2 -N [...] socks代理似乎在端口12345上正常运行,现在当我尝试通过它时: box1 $ curl -x socks5h://localhost:12345 www.google.com curl: (7) Failed to receive SOCKS5 connect request ack. 回到ssh-D窗口,当

在AWS中通过两个EC2实例之间的简单SSH隧道设置socks代理时,我看到了curl问题

box1 $ ssh -v -D 12345 ubuntu@box2 -N
[...]
socks代理似乎在端口12345上正常运行,现在当我尝试通过它时:

box1 $ curl -x socks5h://localhost:12345 www.google.com
curl: (7) Failed to receive SOCKS5 connect request ack.
回到ssh-D窗口,当我运行curl命令时会出现以下错误:

debug1: Connection to port 12345 forwarding to socks port 0 requested.
debug1: channel 1: new [dynamic-tcpip]
channel 1: open failed: administratively prohibited: open failed
debug1: channel 1: free: direct-tcpip: listening port 12345 for www.google.com port 80, connect from 127.0.0.1 port 36240 to 127.0.0.1 port 12345, nchannels 2

有人能解释一下这里发生了什么吗?

您正在使用“-v”参数运行ssh。当curl连接到socks代理端口时,它会打印任何调试输出吗?嗨@Kenster,刚刚根据您的请求编辑了我的问题。希望这能澄清。