feat: replace ssh maxTimeout with keep-alive mechanism (#8062)

* Bump up coder/ssh

* feat: Set default agent timeout to ~72h

* Address PR comments

* Fix
This commit is contained in:
Marcin Tojek
2023-06-16 15:22:18 +02:00
committed by GitHub
parent 751c0505bf
commit 247f8a973f
7 changed files with 30 additions and 13 deletions
+1 -1
View File
@@ -769,7 +769,7 @@ func (*Conn) forwardTCPSockOpts(port uint16) []tcpip.SettableSocketOption {
// See: https://github.com/tailscale/tailscale/blob/c7cea825aea39a00aca71ea02bab7266afc03e7c/wgengine/netstack/netstack.go#L888
if port == WorkspaceAgentSSHPort || port == 22 {
opt := tcpip.KeepaliveIdleOption(72 * time.Hour)
opt := tcpip.KeepaliveIdleOption(72*time.Hour + time.Minute) // Default ssh-max-timeout is 72h, so let's add some extra time.
opts = append(opts, &opt)
}