Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2023 11:46 AM
here is a sample code you can try:
transport = paramiko.Transport((host, port))
transport.connect(None, username, password)
sftp_path =sftp_path + sftp_file_name
sftp = paramiko.SFTPClient.from_transport(transport)
sftp.get(sftp_path, replaced_local_path + flat_file_name)please ensure the all the variables are correctly defined and the connection to the host server is open.