J'utilise ssh [email protected] -p 1234 -D 9898
Commande de tunneling, et j'ai défini Firefox Socks5 IP sur 127.0.0.1 et son port à 9898. Cela fonctionne avec succès, mais dans le terminal, j'ai une erreur en sortie:
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
Cela se produit périodiquement. Qu'est-ce que c'est ça? C'est un problème? Que puis-je faire?
J'ai eu des problèmes similaires. Si vous avez un tunneling avec Firefox via SSH, certaines connexions HTTP peuvent simplement effectuer délai d'attente en raison de la charge de serveur ou de la configuration incorrecte. Lorsque la connexion effectue réellement le délai d'attente, vous obtiendrez un message d'erreur comme celui que vous avez indiqué.
Vous pouvez supprimer ces messages avec la commande suivante
ssh [email protected] -p 1234 -D 9898 -q
De la page Man ssh(1)
-q Quiet mode. Causes most warning and diagnostic messages to be sup-
pressed.
La suppression du message conservera les avertissements de gâcher vos sessions SSH ou Screen.
Définissez le GatewayPorts
sur yes
et réessayez.
ssh -o 'GatewayPorts yes' [email protected] -p 1234 -D 9898
DynamicForward
Specifies that a TCP port on the local machine be forwarded over the secure channel, and the application protocol
is then used to determine where to connect to from the remote machine.
The argument must be [bind_address:]port. IPv6 addresses can be specified by enclosing addresses in square
brackets. By default, the local port is bound in accordance with the GatewayPorts setting. However, an explicit
bind_address may be used to bind the connection to a specific address. The bind_address of “localhost” indicates
that the listening port be bound for local use only, while an empty address or ‘*’ indicates that the port should
be available from all interfaces.
Currently the SOCKS4 and SOCKS5 protocols are supported, and ssh(1) will act as a SOCKS server. Multiple for‐
wardings may be specified, and additional forwardings can be given on the command line. Only the superuser can
forward privileged ports.
GatewayPorts
Specifies whether remote hosts are allowed to connect to local forwarded ports. By default, ssh(1) binds local
port forwardings to the loopback address. This prevents other remote hosts from connecting to forwarded ports.
GatewayPorts can be used to specify that ssh should bind local port forwardings to the wildcard address, thus
allowing remote hosts to connect to forwarded ports. The argument must be “yes” or “no”. The default is “no”.