SSH socks代理反向连接连接被拒绝

所以我编写了一个java应用程序,以相反的方式(-R)连接到服务器,并创build一个ssh服务器,以便服务器在执行我的应用程序的客户端执行命令。 这部分工作完美。 问题是,我想在服务器中创build一个SOCKS代理,并通过客户端隧道化stream量。 我正在使用的命令是:

ssh -vvv -f -D 0.0.0.0:8080 localhost -p 11707 -N

我收到这个错误:

 debug1: Connection to port 8080 forwarding to socks port 0 requested. debug2: fd 5 setting TCP_NODELAY debug2: fd 5 setting O_NONBLOCK debug3: fd 5 is O_NONBLOCK debug1: channel 1: new [dynamic-tcpip] debug2: channel 1: pre_dynamic: have 0 debug2: channel 1: pre_dynamic: have 4 debug2: channel 1: decode socks5 debug2: channel 1: socks5 auth done debug2: channel 1: pre_dynamic: need more debug2: channel 1: pre_dynamic: have 0 debug2: channel 1: pre_dynamic: have 25 debug2: channel 1: decode socks5 debug2: channel 1: socks5 post auth debug2: channel 1: dynamic request: socks5 host www.cualesmiip.com port 80 command 1 channel 1: open failed: administratively prohibited: Connection denied debug2: channel 1: zombie debug2: channel 1: garbage collecting debug1: channel 1: free: direct-tcpip: listening port 8080 for www.cualesmiip.com port 80, connect from 4.174.29.15 port 50879, nchannels 2 debug3: channel 1: status: The following connections are open: 

我在接收连接的ssh服务器中将AllowTcpForwarding设置为yes

哪里可以是错误? 谢谢

在sshd_config中将GatewayPorts选项设置为yes。

GatewayPorts是的