From 41ee133f71cd3d24faeac9b158c749637acb8e8d Mon Sep 17 00:00:00 2001 From: Florent Revest Date: Mon, 18 Mar 2024 19:25:04 +0100 Subject: vm/isolated: allow the use of system-wide SSH config Most of the VM types tightly manage the target they SSH into and can safely assume that system wide SSH configuration would mess with the SSH flags provided by syzkaller. However, in the "isolate" VM type, one can connect to a host that is not at all managed by syzkaller. In this case, it can be useful to leverage system wide SSH config, maybe provided by a corporate environment. This adds an option to the isolated config to skip some of the SSH and SCP flags that would drop system wide config. --- vm/vmware/vmware.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm/vmware') diff --git a/vm/vmware/vmware.go b/vm/vmware/vmware.go index ebfb995bb..4c05bac12 100644 --- a/vm/vmware/vmware.go +++ b/vm/vmware/vmware.go @@ -157,7 +157,7 @@ func (inst *instance) Copy(hostSrc string) (string, error) { base := filepath.Base(hostSrc) vmDst := filepath.Join("/", base) - args := append(vmimpl.SCPArgs(inst.debug, inst.sshkey, 22), + args := append(vmimpl.SCPArgs(inst.debug, inst.sshkey, 22, false), hostSrc, fmt.Sprintf("%v@%v:%v", inst.sshuser, inst.ipAddr, vmDst)) if inst.debug { @@ -186,7 +186,7 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin return nil, nil, err } - args := vmimpl.SSHArgs(inst.debug, inst.sshkey, 22) + args := vmimpl.SSHArgs(inst.debug, inst.sshkey, 22, false) // Forward target port as part of the ssh connection (reverse proxy) if inst.forwardPort != 0 { proxy := fmt.Sprintf("%v:127.0.0.1:%v", inst.forwardPort, inst.forwardPort) -- cgit mrf-deployment