mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-09 19:48:45 +01:00
fix: set number of retries to two again
I was wrong in my previous analysis. The number given is the total number of tries. This is confusing when keyboard authentication and password authentication are both available which usually doesn't happen.
This commit is contained in:
parent
84e7605e36
commit
747a2b784a
@ -410,8 +410,8 @@ func ConnectToClient(opts *sstore.SSHOpts) (*ssh.Client, error) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
authMethods = append(authMethods, publicKeyAuth)
|
authMethods = append(authMethods, publicKeyAuth)
|
||||||
}
|
}
|
||||||
authMethods = append(authMethods, ssh.RetryableAuthMethod(ssh.KeyboardInteractive(createCombinedKbdInteractiveChallenge(opts.SSHPassword)), 1))
|
authMethods = append(authMethods, ssh.RetryableAuthMethod(ssh.KeyboardInteractive(createCombinedKbdInteractiveChallenge(opts.SSHPassword)), 2))
|
||||||
authMethods = append(authMethods, ssh.RetryableAuthMethod(ssh.PasswordCallback(createCombinedPasswordCallbackPrompt(opts.SSHPassword)), 1))
|
authMethods = append(authMethods, ssh.RetryableAuthMethod(ssh.PasswordCallback(createCombinedPasswordCallbackPrompt(opts.SSHPassword)), 2))
|
||||||
|
|
||||||
configUser, _ := ssh_config.GetStrict(opts.SSHHost, "User")
|
configUser, _ := ssh_config.GetStrict(opts.SSHHost, "User")
|
||||||
configHostName, _ := ssh_config.GetStrict(opts.SSHHost, "HostName")
|
configHostName, _ := ssh_config.GetStrict(opts.SSHHost, "HostName")
|
||||||
|
Loading…
Reference in New Issue
Block a user