Add pass and interactive auth to bmcs ssh conf

Adds password and keyboard interactive authentication to the oracle-bmcs
builder.
This commit is contained in:
Andrew Pryde 2017-02-13 12:58:40 +00:00
parent 7eb3f30d50
commit 3473162234
1 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import (
"fmt"
"github.com/mitchellh/multistep"
packerssh "github.com/mitchellh/packer/communicator/ssh"
"golang.org/x/crypto/ssh"
)
@ -31,6 +32,9 @@ func sshConfig(state multistep.StateBag) (*ssh.ClientConfig, error) {
User: c.Comm.SSHUsername,
Auth: []ssh.AuthMethod{
ssh.PublicKeys(signer),
ssh.Password(c.Comm.SSHPassword),
ssh.KeyboardInteractive(
packerssh.PasswordKeyboardInteractive(c.Comm.SSHPassword)),
},
}, nil
}