Questions tagged [pysftp]

pysftp is a thin wrapper over paramiko's SFTPClient.

pysftp is a thin wrapper over 's SFTPClient.

372 questions
3
votes
1 answer

Archive all files from one SFTP folder to another in Python

I was able to successfully upload the file from S3 to SFTP location using the below syntax as given by @Martin Prikryl Transfer file from AWS S3 to SFTP using Boto 3. with sftp.open('/sftp/path/filename', 'wb') as f: …
Kar
  • 790
  • 13
  • 36
3
votes
0 answers

permission errors while using pysftp and paramiko

I have a use case to transfer file over sftp, planning to use paramiko or pysftp modules of python3.7 and having troubles with one of the destinations/targets. File transfer works fine when winSCP is used. Any suggestions to resolve this issue or…
Revanth
  • 299
  • 5
  • 13
3
votes
1 answer

PySFTP failing with "No hostkey for host X found" when deploying Django/Heroku

I'm trying to deploy a Django web application which uses pysftp to access to a SFTP server through some views. The thing was perfectly working in local development, but when trying the first deployment on Heroku, the traceback below appeared ending…
madtyn
  • 1,469
  • 27
  • 55
3
votes
2 answers

With pysftp or Paramiko, how can I get a directory listing complete with attributes?

As the title says, I'm trying to get a list of all the files and directories in a directory, including their attributes (I'm looking for at least name, size, last modified, and is it a file or a folder). I'm using Python 3 on Windows. I've tried…
CyberTaco
  • 338
  • 1
  • 3
  • 14
3
votes
0 answers

Why is Python Complaining About libcrypto When Importing pysftp on macOS Catalina v10.15.1?

I just upgraded my MacBook to Catalina v10.15.1. When executing my python script which only does one thing, imports pysftp, I get the following output: WARNING: Executing a script that is loading libcrypto in an unsafe way. This will fail in a…
cDreamer
  • 385
  • 5
  • 18
3
votes
1 answer

Writing to a file on SFTP server opened using Paramiko/pysftp "open" method is slow

I have a piece of Python code that works, but is very slow to write a Dataframe directly to an SFTP location. I am using pysftp and pandas.to_csv() to achieve the task of reading an Excel file from a remote location, run a few simple transformations…
Marc88
  • 53
  • 1
  • 1
  • 6
3
votes
1 answer

pysftp connection change directory doesn't work

I've tried the following three ways to change a directory and it never changes. has anyone else had this problem? import pysftp cnopts = pysftp.CnOpts() cnopts.hostkeys = None host = 'server1.mydomain.com' # altered with pysftp.Connection(host=host,…
MetaStack
  • 3,266
  • 4
  • 30
  • 67
3
votes
1 answer

PackageNotFoundError: Packages missing in current channels:

I cannot download packages from Anaconda cloud because of company policy with cloud downloads. Therefore, I tried a workaround downloading the bioconda pysftp-0.2.9-py36_0.tar win64 version from Anaconda's website while not on the network and put…
whoknows
  • 31
  • 1
  • 2
3
votes
2 answers

PYSFTP script to Upload and Download

I need some help I'm getting below message when i try to connect. The script Im executing is below. Any suggestions as to how I can fix this issue? Also, once I get this issue fixed Im looking to add to this script the ability to listen until the…
rookievmc
  • 173
  • 2
  • 2
  • 13
3
votes
1 answer

Mocking python class in unit test and verifying an instance

I'm trying to unit test an SFTP helper class that makes some calls to the pysftp module. I want to mock the actual network calls from pysftp so there are no side effects, and just make sure that the class is correctly calling the underlying SFTP…
Spencer Wood
  • 610
  • 6
  • 15
3
votes
1 answer

why is pysftp connection not sending files? hanging on 'put'

I'm trying to send some files via pysftp, authentication seems fine, but actually putting the file results in it hanging, doing nothing. The files are small (<200kb) so I don't believe it's an upload issue (internet access is fine). Eventually the…
3
votes
2 answers

pysftp put error "size mismatch in put! 0 != 14911"

i looked around for this error, but all I could really find is similar mismatch errors for python 3.3 support. I originally was getting errors when trying to use a *.txt wildcard to put all files in the localpath to the remotepath, kept getting file…
Dogbyte
  • 99
  • 2
  • 10
2
votes
0 answers

SFTP server authentication require username and private key

We have SFTP server with authentication enabled. To access the server we need to provide both the password and private key. I'm able to access the server using winscp. But not able to access using the python code. I have tried with pysftp and…
2
votes
1 answer

Download chunk of the large file using pysftp in Python

I have one use case in which I want to read only top 5 rows of a large CSV file which is present in one of my sftp server and I don't want to download the complete file to just read the top 5 rows. I am using pysftp in Python to interact with my…
Shubham Bansal
  • 155
  • 1
  • 6
2
votes
1 answer

Upload zip file from Google cloud storage to SFTP server without loading into memory using Python

I want to upload large zip files from google cloud bucket to SFTP server without loading into memory and cloud function. I am using pysftp for SFTP transfer. with pysftp.Connection(host="SFTP Server", username='test', password='test', cnopts=cnopts)…
PROTOCOL
  • 371
  • 9
  • 17