massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / paramiko / paramiko / client.pyi
1 from socket import socket
2 from typing import Iterable, Mapping, NoReturn, Type
3
4 from paramiko.channel import Channel, ChannelFile, ChannelStderrFile, ChannelStdinFile
5 from paramiko.hostkeys import HostKeys
6 from paramiko.pkey import PKey
7 from paramiko.sftp_client import SFTPClient
8 from paramiko.transport import Transport
9 from paramiko.util import ClosingContextManager
10
11 class SSHClient(ClosingContextManager):
12     def __init__(self) -> None: ...
13     def load_system_host_keys(self, filename: str | None = ...) -> None: ...
14     def load_host_keys(self, filename: str) -> None: ...
15     def save_host_keys(self, filename: str) -> None: ...
16     def get_host_keys(self) -> HostKeys: ...
17     def set_log_channel(self, name: str) -> None: ...
18     def set_missing_host_key_policy(self, policy: Type[MissingHostKeyPolicy] | MissingHostKeyPolicy) -> None: ...
19     def connect(
20         self,
21         hostname: str,
22         port: int = ...,
23         username: str | None = ...,
24         password: str | None = ...,
25         pkey: PKey | None = ...,
26         key_filename: str | None = ...,
27         timeout: float | None = ...,
28         allow_agent: bool = ...,
29         look_for_keys: bool = ...,
30         compress: bool = ...,
31         sock: socket | None = ...,
32         gss_auth: bool = ...,
33         gss_kex: bool = ...,
34         gss_deleg_creds: bool = ...,
35         gss_host: str | None = ...,
36         banner_timeout: float | None = ...,
37         auth_timeout: float | None = ...,
38         gss_trust_dns: bool = ...,
39         passphrase: str | None = ...,
40         disabled_algorithms: dict[str, Iterable[str]] | None = ...,
41     ) -> None: ...
42     def close(self) -> None: ...
43     def exec_command(
44         self,
45         command: str,
46         bufsize: int = ...,
47         timeout: float | None = ...,
48         get_pty: bool = ...,
49         environment: dict[str, str] | None = ...,
50     ) -> tuple[ChannelStdinFile, ChannelFile, ChannelStderrFile]: ...
51     def invoke_shell(
52         self,
53         term: str = ...,
54         width: int = ...,
55         height: int = ...,
56         width_pixels: int = ...,
57         height_pixels: int = ...,
58         environment: Mapping[str, str] | None = ...,
59     ) -> Channel: ...
60     def open_sftp(self) -> SFTPClient: ...
61     def get_transport(self) -> Transport | None: ...
62
63 class MissingHostKeyPolicy:
64     def missing_host_key(self, client: SSHClient, hostname: str, key: PKey) -> None: ...
65
66 class AutoAddPolicy(MissingHostKeyPolicy):
67     def missing_host_key(self, client: SSHClient, hostname: str, key: PKey) -> None: ...
68
69 class RejectPolicy(MissingHostKeyPolicy):
70     def missing_host_key(self, client: SSHClient, hostname: str, key: PKey) -> NoReturn: ...
71
72 class WarningPolicy(MissingHostKeyPolicy):
73     def missing_host_key(self, client: SSHClient, hostname: str, key: PKey) -> None: ...