Fix SSH failure due to .ssh/config owner (#1005)
* use -F option, success configtest and scan * add sshConfigPath in config.toml * Use sshConfigPath in config.toml when using ssh -F * change -ssh-config to deprecated * fix typo * add sshConfigPath in tomltemplate
This commit is contained in:
@@ -260,7 +260,9 @@ func sshExecExternal(c conf.ServerInfo, cmd string, sudo bool) (result execResul
|
||||
|
||||
defaultSSHArgs := []string{"-tt"}
|
||||
|
||||
if !conf.Conf.SSHConfig {
|
||||
if 0 < len(c.SSHConfigPath) {
|
||||
defaultSSHArgs = append(defaultSSHArgs, "-F", c.SSHConfigPath)
|
||||
} else {
|
||||
home, err := homedir.Dir()
|
||||
if err != nil {
|
||||
msg := fmt.Sprintf("Failed to get HOME directory: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user