def __init__(self, peer=None, gss_host=None, override_gss_mech=False, host_based_auth=False, public_key_auth=False, override_pk_ok=False, password_auth=False, password_change_prompt=None, kbdint_auth=False, kbdint_challenge=False, success=False): super().__init__(peer, True) self._gss = GSSServer(gss_host) if gss_host else None self._override_gss_mech = override_gss_mech self._host_based_auth = host_based_auth self._public_key_auth = public_key_auth self._override_pk_ok = override_pk_ok self._password_auth = password_auth self._password_change_prompt = password_change_prompt self._kbdint_auth = kbdint_auth self._kbdint_challenge = kbdint_challenge self._success = success self._auth = None
def __init__(self, alg, gss_host, peer): gss = GSSServer(gss_host) if gss_host else None super().__init__(alg, gss, peer, True) if gss_host and 'no_host_key' in gss_host: self._server_host_key = None else: priv_key = asyncssh.generate_private_key('ssh-rsa') self._server_host_key = SSHLocalKeyPair(priv_key)