summaryrefslogtreecommitdiff
path: root/test/lib/ansible_test/_internal/ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/ansible_test/_internal/ssh.py')
-rw-r--r--test/lib/ansible_test/_internal/ssh.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/lib/ansible_test/_internal/ssh.py b/test/lib/ansible_test/_internal/ssh.py
index 840edf6283..b2a267873a 100644
--- a/test/lib/ansible_test/_internal/ssh.py
+++ b/test/lib/ansible_test/_internal/ssh.py
@@ -32,6 +32,7 @@ from .config import (
@dataclasses.dataclass
class SshConnectionDetail:
"""Information needed to establish an SSH connection to a host."""
+
name: str
host: str
port: t.Optional[int]
@@ -56,7 +57,7 @@ class SshConnectionDetail:
# See: https://www.openssh.com/txt/release-8.8
algorithms = '+ssh-rsa' # append the algorithm to the default list, requires OpenSSH 7.0 or later
- options.update(dict(
+ options.update(
# Host key signature algorithms that the client wants to use.
# Available options can be found with `ssh -Q HostKeyAlgorithms` or `ssh -Q key` on older clients.
# This option was updated in OpenSSH 7.0, released on 2015-08-11, to support the "+" prefix.
@@ -69,13 +70,14 @@ class SshConnectionDetail:
# This option is an alias for PubkeyAcceptedAlgorithms, which was added in OpenSSH 8.5.
# See: https://www.openssh.com/txt/release-8.5
PubkeyAcceptedKeyTypes=algorithms,
- ))
+ )
return options
class SshProcess:
"""Wrapper around an SSH process."""
+
def __init__(self, process: t.Optional[subprocess.Popen]) -> None:
self._process = process
self.pending_forwards: t.Optional[list[tuple[str, int]]] = None
@@ -161,7 +163,7 @@ def create_ssh_command(
'ssh',
'-n', # prevent reading from stdin
'-i', ssh.identity_file, # file from which the identity for public key authentication is read
- ]
+ ] # fmt: skip
if not command:
cmd.append('-N') # do not execute a remote command