mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-10 17:20:26 -04:00
parent
8fb3170fca
commit
a40bb9af99
1 changed files with 5 additions and 1 deletions
|
|
@ -49,6 +49,7 @@ func SSHConfig(useAgent bool, username, password string) func(multistep.StateBag
|
|||
Auth: []ssh.AuthMethod{
|
||||
ssh.PublicKeysCallback(agent.NewClient(sshAgent).Signers),
|
||||
},
|
||||
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
@ -64,6 +65,7 @@ func SSHConfig(useAgent bool, username, password string) func(multistep.StateBag
|
|||
Auth: []ssh.AuthMethod{
|
||||
ssh.PublicKeys(signer),
|
||||
},
|
||||
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
|
||||
}, nil
|
||||
|
||||
} else {
|
||||
|
|
@ -73,7 +75,9 @@ func SSHConfig(useAgent bool, username, password string) func(multistep.StateBag
|
|||
ssh.Password(password),
|
||||
ssh.KeyboardInteractive(
|
||||
packerssh.PasswordKeyboardInteractive(password)),
|
||||
}}, nil
|
||||
},
|
||||
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue