diff --git a/builder/docker/comm.go b/builder/docker/comm.go index c064c0550..8af3d57ca 100644 --- a/builder/docker/comm.go +++ b/builder/docker/comm.go @@ -36,6 +36,7 @@ func sshConfig(comm *communicator.Config) func(state multistep.StateBag) (*gossh Auth: []gossh.AuthMethod{ gossh.PublicKeys(signer), }, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } else { // password based auth @@ -46,6 +47,7 @@ func sshConfig(comm *communicator.Config) func(state multistep.StateBag) (*gossh gossh.KeyboardInteractive( ssh.PasswordKeyboardInteractive(comm.SSHPassword)), }, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } } diff --git a/builder/null/ssh.go b/builder/null/ssh.go index 1cbf4ceac..b8dea896e 100644 --- a/builder/null/ssh.go +++ b/builder/null/ssh.go @@ -39,6 +39,7 @@ func SSHConfig(useAgent bool, username string, password string, privateKeyFile s Auth: []gossh.AuthMethod{ gossh.PublicKeysCallback(agent.NewClient(sshAgent).Signers), }, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } @@ -61,6 +62,7 @@ func SSHConfig(useAgent bool, username string, password string, privateKeyFile s Auth: []gossh.AuthMethod{ gossh.PublicKeys(signer), }, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, nil } else { // password based auth diff --git a/builder/vmware/iso/driver_esx5.go b/builder/vmware/iso/driver_esx5.go index bcd71cbd4..9f557b540 100644 --- a/builder/vmware/iso/driver_esx5.go +++ b/builder/vmware/iso/driver_esx5.go @@ -395,8 +395,9 @@ func (d *ESX5Driver) connect() error { sshConfig := &ssh.Config{ Connection: ssh.ConnectFunc("tcp", address), SSHConfig: &gossh.ClientConfig{ - User: d.Username, - Auth: auth, + User: d.Username, + Auth: auth, + HostKeyCallback: gossh.InsecureIgnoreHostKey(), }, }