add hostkeycallback everywhere else

This commit is contained in:
Matthew Hooker 2017-06-21 11:59:57 -07:00
parent 2a6f5f1b13
commit 6581e0b7d6
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
2 changed files with 4 additions and 0 deletions

View File

@ -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
}
}

View File

@ -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