From defe134c8b7ed9611139a67fa80b47d27e80fec6 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sun, 14 May 2017 14:16:12 +0200 Subject: [PATCH] sshbytestream: default ServerAliveInterval --- sshbytestream/ssh.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sshbytestream/ssh.go b/sshbytestream/ssh.go index 9716c0a..4986951 100644 --- a/sshbytestream/ssh.go +++ b/sshbytestream/ssh.go @@ -26,6 +26,7 @@ type SSHTransport struct { } var SSHCommand string = "ssh" +var SSHServerAliveInterval uint = 60 func Incoming() (wc io.ReadWriteCloser, err error) { // derivce ReadWriteCloser from stdin & stdout @@ -60,6 +61,7 @@ func Outgoing(remote SSHTransport) (c *util.IOCommand, err error) { "-q", "-i", remote.IdentityFile, "-o", "BatchMode=yes", + "-o", fmt.Sprintf("ServerAliveInterval=%d", SSHServerAliveInterval), ) for _, option := range remote.Options { sshArgs = append(sshArgs, "-o", option)