From d6162141a3d34e594816d657ed36c1b7ddb48eeb Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 31 Jan 2024 20:20:20 +0100 Subject: good start --- src/c_exec.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/c_exec.go') 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) } -- cgit v1.2.3