ssh-handler 1.0.8__tar.gz → 1.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ssh_handler-1.0.8/ssh_handler.egg-info → ssh_handler-1.0.9}/PKG-INFO +1 -1
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/pyproject.toml +1 -1
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/__init__.py +1 -1
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/config.py +5 -1
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/core.py +6 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9/ssh_handler.egg-info}/PKG-INFO +1 -1
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/LICENSE +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/README.md +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/setup.cfg +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/__main__.py +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/cli.py +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/credentials.py +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/exceptions.py +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/ftp.py +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/openssh/OpenSSH-ARM64.zip +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/openssh/OpenSSH-Win32.zip +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/openssh/OpenSSH-Win64.zip +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/pool.py +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/pyqt_worker.py +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/results.py +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/setup_openssh_server.ps1 +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler/winrm_bootstrap.py +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler.egg-info/SOURCES.txt +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler.egg-info/dependency_links.txt +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler.egg-info/entry_points.txt +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler.egg-info/requires.txt +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/ssh_handler.egg-info/top_level.txt +0 -0
- {ssh_handler-1.0.8 → ssh_handler-1.0.9}/tests/test_offline.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ssh-handler"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.9"
|
|
8
8
|
description = "Extensive SSH/SFTP/SCP/FTP handler built on Paramiko, for test automation, CLIs and PyQt5 tools."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -70,7 +70,11 @@ class SSHConfig:
|
|
|
70
70
|
winrm_transport: str = "ntlm" # ntlm works with domain creds, no Kerberos
|
|
71
71
|
|
|
72
72
|
# --- host key policy ---
|
|
73
|
-
|
|
73
|
+
# "auto" -> add unknown host keys, but reject a CHANGED key
|
|
74
|
+
# "ignore" -> accept any key incl. changed ones (lab / reimaged / DHCP hosts)
|
|
75
|
+
# "reject" -> strict; only keys already in known_hosts
|
|
76
|
+
# "warn" -> warn on unknown keys
|
|
77
|
+
host_key_policy: str = "auto"
|
|
74
78
|
known_hosts: Optional[str] = None
|
|
75
79
|
|
|
76
80
|
# --- jump host / bastion (ProxyJump) ---
|
|
@@ -220,6 +220,12 @@ class SSHHandler:
|
|
|
220
220
|
|
|
221
221
|
def _make_client(self) -> paramiko.SSHClient:
|
|
222
222
|
client = paramiko.SSHClient()
|
|
223
|
+
if self.config.host_key_policy == "ignore":
|
|
224
|
+
# Lab mode: don't load any known_hosts and accept whatever key the
|
|
225
|
+
# server presents - even a CHANGED one. Use for reimaged / DHCP
|
|
226
|
+
# devices whose host keys rotate (avoids BadHostKeyException).
|
|
227
|
+
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
228
|
+
return client
|
|
223
229
|
if self.config.known_hosts:
|
|
224
230
|
try:
|
|
225
231
|
client.load_host_keys(os.path.expanduser(self.config.known_hosts))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|