mirror of
https://github.com/zrepl/zrepl.git
synced 2025-04-23 02:50:44 +02:00
sshbytestream: default ServerAliveInterval
This commit is contained in:
parent
b1a3a57623
commit
defe134c8b
@ -26,6 +26,7 @@ type SSHTransport struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var SSHCommand string = "ssh"
|
var SSHCommand string = "ssh"
|
||||||
|
var SSHServerAliveInterval uint = 60
|
||||||
|
|
||||||
func Incoming() (wc io.ReadWriteCloser, err error) {
|
func Incoming() (wc io.ReadWriteCloser, err error) {
|
||||||
// derivce ReadWriteCloser from stdin & stdout
|
// derivce ReadWriteCloser from stdin & stdout
|
||||||
@ -60,6 +61,7 @@ func Outgoing(remote SSHTransport) (c *util.IOCommand, err error) {
|
|||||||
"-q",
|
"-q",
|
||||||
"-i", remote.IdentityFile,
|
"-i", remote.IdentityFile,
|
||||||
"-o", "BatchMode=yes",
|
"-o", "BatchMode=yes",
|
||||||
|
"-o", fmt.Sprintf("ServerAliveInterval=%d", SSHServerAliveInterval),
|
||||||
)
|
)
|
||||||
for _, option := range remote.Options {
|
for _, option := range remote.Options {
|
||||||
sshArgs = append(sshArgs, "-o", option)
|
sshArgs = append(sshArgs, "-o", option)
|
||||||
|
Loading…
Reference in New Issue
Block a user