communicator/ssh: fix typos travis didn't catch

I think rebasing and splitting got me into a weird state. This should
fix the build failures on master.
This commit is contained in:
Paul Hinze 2015-11-12 16:00:28 -06:00
parent c897d0a2c7
commit b6aed3fec3
1 changed files with 3 additions and 3 deletions

View File

@ -98,10 +98,10 @@ func parseConnectionInfo(s *terraform.InstanceState) (*connectionInfo, error) {
// Load deprecated fields; we can handle either path or contents in
// underlying implementation.
if connInfo.PrivateKey == "" && connInfo.KeyFile != "" {
connInfo.PrivateKey = conninfo.KeyFile
connInfo.PrivateKey = connInfo.KeyFile
}
if connInfo.BastionPrivateKey == "" && connInfo.BastionKeyFile != "" {
connInfo.BastionPrivateKey = conninfo.BastionKeyFile
connInfo.BastionPrivateKey = connInfo.BastionKeyFile
}
// Default all bastion config attrs to their non-bastion counterparts
@ -192,7 +192,7 @@ func buildSSHClientConfig(opts sshClientConfigOpts) (*ssh.ClientConfig, error) {
User: opts.user,
}
if opts.keyFile != "" {
if opts.privateKey != "" {
pubKeyAuth, err := readPrivateKey(opts.privateKey)
if err != nil {
return nil, err