diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2015-11-09 11:28:26 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2015-11-09 11:28:26 +0100 |
| commit | d2c7f41bb04f921a8ce226b7ffae3bf0ef95fc3d (patch) | |
| tree | 0ae3b517cf0adeebb35f08dbe3e74d31524718c9 | |
| parent | a44473e4a4de4d1c3a192c87a41e7a2234898987 (diff) | |
fix ssh when you have too many keys
IdentitiesOnly=yes disables sending of irrelevant keys
| -rw-r--r-- | vm/qemu/qemu.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go index 4b64d0322..bcd1f3e57 100644 --- a/vm/qemu/qemu.go +++ b/vm/qemu/qemu.go @@ -422,6 +422,7 @@ func (inst *Instance) CreateSSHCommand(args ...string) *Command { args1 := []string{"ssh", "-i", inst.Sshkey, "-p", strconv.Itoa(inst.Port), "-o", "ConnectionAttempts=10", "-o", "ConnectTimeout=10", "-o", "BatchMode=yes", "-o", "UserKnownHostsFile=/dev/null", + "-o", "IdentitiesOnly=yes", "-o", "StrictHostKeyChecking=no", "root@localhost"} return inst.CreateCommand(append(args1, args...)...) } @@ -430,6 +431,7 @@ func (inst *Instance) CreateSCPCommand(from, to string) *Command { return inst.CreateCommand("scp", "-i", inst.Sshkey, "-P", strconv.Itoa(inst.Port), "-o", "ConnectionAttempts=10", "-o", "ConnectTimeout=10", "-o", "BatchMode=yes", "-o", "UserKnownHostsFile=/dev/null", + "-o", "IdentitiesOnly=yes", "-o", "StrictHostKeyChecking=no", from, "root@localhost:"+to) } |
