on_auth_failed Event
Fires if an authentication attempt fails.
Syntax
class SFTPClientAuthFailedEventParams(object): @property def auth_type() -> int: ... # In class SFTPClient: @property def on_auth_failed() -> Callable[[SFTPClientAuthFailedEventParams], None]: ... @on_auth_failed.setter def on_auth_failed(event_hook: Callable[[SFTPClientAuthFailedEventParams], None]) -> None: ...
Remarks
This event fires if an authentication attempt fails (for example, if a bad password had been provided). AuthType parameter indicates the authentication type.
AuthFailed may be fired more than once, depending on the configured authentication parameters and the value assigned to the auth_attempts property.
This event does not necessarily lead to connection abortion, as the client may still have a chance of authenticating with a different method.
Supported authentication types:
atRhosts | 0x01 | RHOSTS file authentication. Rarely used today. |
atPublicKey | 0x02 | Public key (sometimes called private key) authentication |
atPassword | 0x04 | Password-based authentication |
atHostbased | 0x08 | Hostbased authentication |
atKeyboard | 0x10 | Keyboard-interactive authentication. This is often used in place of generic password authentication. |
atGssWithMic | 0x20 | GSS authentication |
atGssKeyex | 0x40 | GSS authentication with key exchange |
atPublicKeyAgent | 0x80 | Public key agent authentication |