Skip to content

Commit

Permalink
Really restrict to the connect call.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeZiminski committed Apr 19, 2024
1 parent 5e00442 commit 89d40a8
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions datashuttle/utils/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from pathlib import Path

from datashuttle.configs.config_class import Configs

import fnmatch
import getpass
import stat
import sys
from pathlib import Path
from typing import Any, List, Optional, Tuple

import paramiko
Expand All @@ -32,18 +33,12 @@ def connect_client_core(
client.get_host_keys().load(cfg.hostkeys_path.as_posix())
client.set_missing_host_key_policy(
paramiko.AutoAddPolicy()
) # AutoAddPolicy"!! REMOVE!!! TESTING!!
) # TODO: ADDBACK IN!! RejectPolicy

client.connect(
cfg["central_host_id"],
username=cfg["central_host_username"],
password=password,
key_filename=(
cfg.ssh_key_path.as_posix()
if isinstance(cfg.ssh_key_path, Path)
else None
),
look_for_keys=True,
password="password", # TODO: ADDBACK IN!! RejectPolicy
)


Expand Down

0 comments on commit 89d40a8

Please sign in to comment.