keyboard-interactive used when ssh_bastion_host is true.
This commit is contained in:
parent
a0dfcf3715
commit
34bb0429d0
|
@ -132,6 +132,8 @@ type SSH struct {
|
|||
SSHBastionUsername string `mapstructure:"ssh_bastion_username"`
|
||||
// The password to use to authenticate with the bastion host.
|
||||
SSHBastionPassword string `mapstructure:"ssh_bastion_password"`
|
||||
// If `true`, the keyboard-interactive used to authenticate with bastion host.
|
||||
SSHBastionInteractive bool `mapstructure:"ssh_bastion_interactive"`
|
||||
// Path to a PEM encoded private key file to use to authenticate with the
|
||||
// bastion host. The `~` can be used in path and will be expanded to the
|
||||
// home directory of current user.
|
||||
|
|
|
@ -246,7 +246,9 @@ func (s *StepConnectSSH) waitForSSH(state multistep.StateBag, ctx context.Contex
|
|||
func sshBastionConfig(config *Config) (*gossh.ClientConfig, error) {
|
||||
auth := make([]gossh.AuthMethod, 0, 2)
|
||||
|
||||
if config.SSHBastionInteractive {
|
||||
auth = append(auth, gossh.KeyboardInteractive(ssh.KeyboardInteractive()))
|
||||
}
|
||||
|
||||
if config.SSHBastionPassword != "" {
|
||||
auth = append(auth,
|
||||
|
|
Loading…
Reference in New Issue