Skip to content

Commit

Permalink
fix for non standard ssh sftp port
Browse files Browse the repository at this point in the history
  • Loading branch information
pellcorp authored and alexole committed Apr 27, 2022
1 parent c196147 commit 4b6456b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rohmu/object_storage/sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import logging
import os
import paramiko
import warnings


class SFTPTransfer(BaseTransfer):
Expand All @@ -36,7 +37,10 @@ def __init__(self,

logging.getLogger("paramiko").setLevel(logging.WARNING)

transport = paramiko.Transport(self.server, self.port)
# https://github.com/paramiko/paramiko/issues/1386#issuecomment-470847772
warnings.filterwarnings(action='ignore', module='.*paramiko.*')

transport = paramiko.Transport((self.server, self.port))

if private_key:
pkey = paramiko.RSAKey.from_private_key_file(self.private_key)
Expand Down

0 comments on commit 4b6456b

Please sign in to comment.