From d2c7f41bb04f921a8ce226b7ffae3bf0ef95fc3d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 9 Nov 2015 11:28:26 +0100 Subject: fix ssh when you have too many keys IdentitiesOnly=yes disables sending of irrelevant keys --- vm/qemu/qemu.go | 2 ++ 1 file changed, 2 insertions(+) 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) } -- cgit mrf-deployment