diff options
Diffstat (limited to 'src/c_exec.go')
-rw-r--r-- | src/c_exec.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/c_exec.go b/src/c_exec.go index 129ff89..145d1f0 100644 --- a/src/c_exec.go +++ b/src/c_exec.go @@ -84,8 +84,12 @@ func c_format_ssh_jump(host *HostNode) string { } func c_format_ssh(host *HostNode) []string { - cmd_fmt := []string{"ssh"} + cmd_fmt := []string{} + if len(host.Pass) > 0 { + cmd_fmt = append(cmd_fmt, "sshpass", "-p", host.Pass) + } + cmd_fmt = append(cmd_fmt, "ssh") if len(host.Priv) > 0 { cmd_fmt = append(cmd_fmt, "-i", host.Priv) } |