diff options
| author | Florent Revest <revest@chromium.org> | 2024-03-18 19:25:04 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-03-19 11:15:24 +0000 |
| commit | 41ee133f71cd3d24faeac9b158c749637acb8e8d (patch) | |
| tree | fd303ee9b3afafbefa9d61e4018bbe010a642d72 /vm/vmm/vmm.go | |
| parent | baa80228d652d8b1341ecf7f1411c4e4caf75bd5 (diff) | |
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.
Diffstat (limited to 'vm/vmm/vmm.go')
| -rw-r--r-- | vm/vmm/vmm.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vm/vmm/vmm.go b/vm/vmm/vmm.go index bcddc3af0..71dfd39b4 100644 --- a/vm/vmm/vmm.go +++ b/vm/vmm/vmm.go @@ -187,7 +187,7 @@ func (inst *instance) Boot() error { } if err := vmimpl.WaitForSSH(inst.debug, 20*time.Minute, inst.sshhost, - inst.sshkey, inst.sshuser, inst.os, inst.sshport, nil); err != nil { + inst.sshkey, inst.sshuser, inst.os, inst.sshport, nil, false); err != nil { out := <-inst.merger.Output return vmimpl.BootError{Title: err.Error(), Output: out} } @@ -239,7 +239,7 @@ func (inst *instance) Forward(port int) (string, error) { func (inst *instance) Copy(hostSrc string) (string, error) { vmDst := filepath.Join("/root", filepath.Base(hostSrc)) - args := append(vmimpl.SCPArgs(inst.debug, inst.sshkey, inst.sshport), + args := append(vmimpl.SCPArgs(inst.debug, inst.sshkey, inst.sshport, false), hostSrc, inst.sshuser+"@"+inst.sshhost+":"+vmDst) if inst.debug { log.Logf(0, "running command: scp %#v", args) @@ -259,7 +259,7 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin } inst.merger.Add("ssh", rpipe) - args := append(vmimpl.SSHArgs(inst.debug, inst.sshkey, inst.sshport), + args := append(vmimpl.SSHArgs(inst.debug, inst.sshkey, inst.sshport, false), inst.sshuser+"@"+inst.sshhost, command) if inst.debug { log.Logf(0, "running command: ssh %#v", args) |
