diff --git a/builder/hyperv/common/ssh.go b/builder/hyperv/common/ssh.go index 50db23ac2..182d154ff 100644 --- a/builder/hyperv/common/ssh.go +++ b/builder/hyperv/common/ssh.go @@ -42,8 +42,9 @@ func SSHConfigFunc(config *SSHConfig) func(multistep.StateBag) (*gossh.ClientCon } return &gossh.ClientConfig{ - User: config.Comm.SSHUsername, - Auth: auth, + User: config.Comm.SSHUsername, + Auth: auth, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } } diff --git a/builder/null/ssh.go b/builder/null/ssh.go index 3c31df5cc..7af2b55d7 100644 --- a/builder/null/ssh.go +++ b/builder/null/ssh.go @@ -50,6 +50,7 @@ func SSHConfig(username string, password string, privateKeyFile string) func(mul gossh.KeyboardInteractive( ssh.PasswordKeyboardInteractive(password)), }, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } } diff --git a/builder/oneandone/ssh.go b/builder/oneandone/ssh.go index 8f1856a8e..33fe0cc01 100644 --- a/builder/oneandone/ssh.go +++ b/builder/oneandone/ssh.go @@ -41,7 +41,8 @@ func sshConfig(state multistep.StateBag) (*gossh.ClientConfig, error) { auth = append(auth, gossh.PublicKeys(signer)) } return &gossh.ClientConfig{ - User: config.Comm.SSHUsername, - Auth: auth, + User: config.Comm.SSHUsername, + Auth: auth, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } diff --git a/builder/profitbricks/ssh.go b/builder/profitbricks/ssh.go index 7069a77ba..a40959cc7 100644 --- a/builder/profitbricks/ssh.go +++ b/builder/profitbricks/ssh.go @@ -41,7 +41,8 @@ func sshConfig(state multistep.StateBag) (*gossh.ClientConfig, error) { auth = append(auth, gossh.PublicKeys(signer)) } return &gossh.ClientConfig{ - User: config.Comm.SSHUsername, - Auth: auth, + User: config.Comm.SSHUsername, + Auth: auth, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } diff --git a/builder/qemu/ssh.go b/builder/qemu/ssh.go index 83c923f67..1881613fd 100644 --- a/builder/qemu/ssh.go +++ b/builder/qemu/ssh.go @@ -35,7 +35,8 @@ func sshConfig(state multistep.StateBag) (*gossh.ClientConfig, error) { } return &gossh.ClientConfig{ - User: config.Comm.SSHUsername, - Auth: auth, + User: config.Comm.SSHUsername, + Auth: auth, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } diff --git a/builder/virtualbox/common/ssh.go b/builder/virtualbox/common/ssh.go index 5316a1c31..b09c0cc47 100644 --- a/builder/virtualbox/common/ssh.go +++ b/builder/virtualbox/common/ssh.go @@ -36,8 +36,9 @@ func SSHConfigFunc(config SSHConfig) func(multistep.StateBag) (*gossh.ClientConf } return &gossh.ClientConfig{ - User: config.Comm.SSHUsername, - Auth: auth, + User: config.Comm.SSHUsername, + Auth: auth, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } } diff --git a/builder/vmware/common/ssh.go b/builder/vmware/common/ssh.go index c03a4e2df..0d94599f8 100644 --- a/builder/vmware/common/ssh.go +++ b/builder/vmware/common/ssh.go @@ -84,8 +84,9 @@ func SSHConfigFunc(config *SSHConfig) func(multistep.StateBag) (*gossh.ClientCon } return &gossh.ClientConfig{ - User: config.Comm.SSHUsername, - Auth: auth, + User: config.Comm.SSHUsername, + Auth: auth, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } }