Ara*_*avi 20 ssh tunneling ssh-tunnel socks
我使用ssh user@xx.yy.zz.41 -p 1234 -D 9898
命令进行隧道传输,并将 firefox socks5 ip 设置为 127.0.0.1 并将其端口设置为 9898。它工作成功,但在终端中我有输出错误:
channel 39: open failed: connect failed: Connection timed out
channel 41: open failed: connect failed: Connection timed out
channel 42: open failed: connect failed: Connection timed out
channel 43: open failed: connect failed: Connection timed out
channel 44: open failed: connect failed: Connection timed out
Run Code Online (Sandbox Code Playgroud)
它定期发生。这是什么?这是个问题吗?我能做什么?
小智 23
我也遇到过类似的问题。如果您通过 ssh 使用 Firefox 进行隧道传输,则某些 http 连接可能只是由于服务器负载或配置不当而超时。当连接确实超时时,您将收到一条与您指出的类似的错误消息。
您可以使用以下命令抑制这些消息
ssh user@xx.yy.zz.41 -p 1234 -D 9898 -q
Run Code Online (Sandbox Code Playgroud)
从手册页 ssh(1)
-q Quiet mode. Causes most warning and diagnostic messages to be sup-
pressed.
Run Code Online (Sandbox Code Playgroud)
抑制该消息将使警告不会弄乱您的 ssh 或屏幕会话。
将 设为GatewayPorts
并重yes
试。
ssh -o \'GatewayPorts yes\' user@xx.yy.zz.41 -p 1234 -D 9898\n
Run Code Online (Sandbox Code Playgroud)\n\n\n\n DynamicForward\n Specifies that a TCP port on the local machine be forwarded over the secure channel, and the application protocol\n is then used to determine where to connect to from the remote machine.\n\n The argument must be [bind_address:]port. IPv6 addresses can be specified by enclosing addresses in square\n brackets. By default, the local port is bound in accordance with the GatewayPorts setting. However, an explicit\n bind_address may be used to bind the connection to a specific address. The bind_address of \xe2\x80\x9clocalhost\xe2\x80\x9d indicates\n that the listening port be bound for local use only, while an empty address or \xe2\x80\x98*\xe2\x80\x99 indicates that the port should\n be available from all interfaces.\n\n Currently the SOCKS4 and SOCKS5 protocols are supported, and ssh(1) will act as a SOCKS server. Multiple for\xe2\x80\x90\n wardings may be specified, and additional forwardings can be given on the command line. Only the superuser can\n forward privileged ports.\n\n GatewayPorts\n Specifies whether remote hosts are allowed to connect to local forwarded ports. By default, ssh(1) binds local\n port forwardings to the loopback address. This prevents other remote hosts from connecting to forwarded ports.\n GatewayPorts can be used to specify that ssh should bind local port forwardings to the wildcard address, thus\n allowing remote hosts to connect to forwarded ports. The argument must be \xe2\x80\x9cyes\xe2\x80\x9d or \xe2\x80\x9cno\xe2\x80\x9d. The default is \xe2\x80\x9cno\xe2\x80\x9d.\n
Run Code Online (Sandbox Code Playgroud)\n
归档时间: |
|
查看次数: |
27990 次 |
最近记录: |