diff options
author | Joe <rbo@gmx.us> | 2024-01-31 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-31 20:20:20 +0100 |
commit | d6162141a3d34e594816d657ed36c1b7ddb48eeb (patch) | |
tree | 94cf3ceacf6f03cc6289c3c3ba994264a588a3c6 /src/c_exec.go | |
parent | way better roadmap (diff) | |
download | hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.tar.gz hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.tar.bz2 hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.tar.xz hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.tar.zst hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.zip |
good start
Diffstat (limited to '')
-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) } |