assh icon indicating copy to clipboard operation
assh copied to clipboard

GatewayTimeOut does not work for 'direct' gateway connection

Open jsimonetti opened this issue 5 years ago • 2 comments

When using the following configuration (assh version 2.8.0 (HEAD)):

hosts:
  server:
    Hostname: 10.10.1.2
    Port: 22
    User: jeroen
    IdentityFile: ~/.ssh/identity/jeroen.key
    DynamicForward: 1080
    GatewayConnectionTimeout: 5 
    Gateways:
      - direct
      - home

  home:
    Hostname: <public_ip_of_firewall>
    Port: 443
    User: jeroen
    DynamicForward: 1080
    IdentityFile: ~/.ssh/identity/jeroen.key

The timeout of 5 seconds is not applied to the direct gateway. In result, the connection to 10.10.1.2 needs to timeout normally (around 2 minutes) before the home gateway is used. This appears to only happen when I am on networks that drop firewalled packets instead of actively denying connections.

Am I not understanding the use of 'direct' properly or am I doing something wrong? What I would like to accomplish is to try to connect to server directly if possible (basically when I am at home) and otherwise use an SSH Tunnel over the public internet to my home router.

Edit: I tried current master and result is the same (after applying the tiny patch from #323)

jsimonetti avatar Sep 30 '19 11:09 jsimonetti

Same issue in general - it seems GatewayConnectionTimeout is simply ignored whatever value is used...

Mac OS Mojave assh 2.9.1 by homebrew

Falkor avatar Apr 22 '20 15:04 Falkor

Looks like the parameter is GatewayConnectTimeout. If I use that it works.

austinbutler avatar Jun 02 '21 02:06 austinbutler