Browse Source

set ServerAliveInterval to prevent idle connection from timing out

$ time sudo docker run --rm fphammerle/ssh-remote-forwarding:latest
+ exec /bin/sh -c 'ssh -T -R $BIND_ADDRESS:22:$DOCKER_HOST_ADDRESS:22 serveo.net'
Hi there
Authenticated to serveo.net ([159.89.214.31]:22).
Forwarding SSH traffic from alias "bind-address"
Connection to serveo.net closed by remote host.
Transferred: sent 1444, received 1424 bytes, in 600.1 seconds
Bytes per second: sent 2.4, received 2.4
Command exited with non-zero status 255
0.11user 0.00system 10:01.65elapsed 0%CPU (0avgtext+0avgdata 31428maxresident)k
0inputs+0outputs (0major+3039minor)pagefaults 0swaps

[255] $
Fabian Peter Hammerle 5 years ago
parent
commit
74d4877fd2
1 changed files with 4 additions and 0 deletions
  1. 4 0
      ssh_config

+ 4 - 0
ssh_config

@@ -18,3 +18,7 @@ ExitOnForwardFailure yes
 
 # https://security.stackexchange.com/questions/110639/how-exploitable-is-the-recent-useroaming-ssh-problem
 UseRoaming no
+
+# prevent idle connection from timing out
+# https://serveo.net/
+ServerAliveInterval 60