Skip to content

Commit

Permalink
Auto add ssh missing host keys
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasotodegraeve committed Dec 12, 2024
1 parent cc92dfa commit cb14cb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prefect_meemoo/ssh/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from prefect import get_run_logger
from pydantic import SecretStr
from pydantic import Field
from paramiko import SSHClient
from paramiko import SSHClient, AutoAddPolicy


class SSHCredentials(Block):
Expand Down Expand Up @@ -56,7 +56,7 @@ def get_client(self) -> SSHClient:
"""

client = SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(AutoAddPolicy())
try:
client.connect(
hostname=self.hostname,
Expand Down

0 comments on commit cb14cb4

Please sign in to comment.