Change default ssh method from go library to external command (#416)

* Change default ssh method from go library to external command
This commit is contained in:
Kota Kanbe
2017-04-06 12:00:09 +09:00
committed by Teppei Fukuda
parent 33b2aa2d52
commit 05884c2d29
6 changed files with 45 additions and 43 deletions

View File

@@ -151,10 +151,10 @@ func exec(c conf.ServerInfo, cmd string, sudo bool, log ...*logrus.Entry) (resul
if c.Port == "local" &&
(c.Host == "127.0.0.1" || c.Host == "localhost") {
result = localExec(c, cmd, sudo)
} else if conf.Conf.SSHExternal {
result = sshExecExternal(c, cmd, sudo)
} else {
} else if conf.Conf.SSHNative {
result = sshExecNative(c, cmd, sudo)
} else {
result = sshExecExternal(c, cmd, sudo)
}
logger := getSSHLogger(log...)