Files
xc/remote/ssh.go
Pavel Vorobyov 7ea2ec5330 No parallel pty (#5)
* poller and pty removed for parallel execution
2019-10-01 10:42:10 +03:00

26 lines
484 B
Go

package remote
import (
"fmt"
)
var (
sshOptions = map[string]string{
"PasswordAuthentication": "no",
"PubkeyAuthentication": "yes",
"StrictHostKeyChecking": "no",
"TCPKeepAlive": "yes",
"ServerAliveCountMax": "12",
"ServerAliveInterval": "5",
}
)
func sshOpts() (params []string) {
params = make([]string, 0)
for opt, value := range sshOptions {
option := fmt.Sprintf("%s=%s", opt, value)
params = append(params, "-o", option)
}
return
}