Skip to content

Commit b777338

Browse files
committed
main: adjust SSH opts
1 parent d60d1f5 commit b777338

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: main.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ func setupSSHTunnel(ctx context.Context, conf sshConfig, out chan error) error {
115115
"-o", "PasswordAuthentication=no", // disable password authentication
116116
"-o", "PreferredAuthentications=publickey", // only use public key authentication
117117
"-o", "IdentitiesOnly=yes", // only use explicitly provided keys
118-
// "-o", "UseKeychain=no", // disable macOS keychain
119-
// "-o", "IdentityAgent=none", // disable SSH agent
118+
"-o", "ServerAliveInterval=60", // send keep-alive every 60 seconds
119+
"-o", "ServerAliveCountMax=3", // allow 3 missed keep-alive responses before disconnecting
120+
"-o", "TCPKeepAlive=yes", // enable TCP keep-alive
120121
"-i", conf.KeyFile, // specify the key file to use
121122
"-L", fmt.Sprintf("%d:localhost:%d", conf.LocalPort, conf.RemotePort),
122123
conf.Host,

0 commit comments

Comments
 (0)