I want to read some CSV/Excel files on a secure SFTP folder, make some changes (fixed changes in each file like remove column 2) in those files, upload them to a Postgre DB and also the upload them to a different SFTP path in Python
What's the best…
I'm trying to get latest new file in a directory of remote Linux server. The file in SFTP server is created every 4 hours and the file have specific name start with filegen_date_hour.json as per example below. In this case latest file…
I was trying to send a file using SFTP python library pysftp to a remote mailbox server. But when I try to put the file I get this Error:
I'm using python 3.7.4
Traceback (most recent call last):
File "SFTP.py", line 54, in
…
I have the following code to download from 4 different FTP servers. It works on my local machine, but on server "ftp4" is not connecting. It is weird that I can connect to "ftp4" with FileZilla without any problem on the server. Here is the…
I am trying to establish a connection from AWS Glue to a remote server via SFTP using Python 3.7. I tried using the pysftp library for this task.
But pysftp uses a library named bcrypt that has python and c code. As of this moment, AWS Glue only…
I have a file >500 MB to download using sftp connection, I tried using pysptp and getting error SSHException: Server connection dropped:
import pysftp
import sys
myHostname = "dbfiles.xyz.org"
myUsername = "XXXX"
myPassword = "YYYY"
cnopts =…
I am trying to use pysftp and gets the same error as many others. That there is no hostkey for host. I have tried many fixes, but none of them seem to work.
When I try to set hostname I get these errors:
cnopts =…
We are trying to transfer text files from a Linux server to a Windows server using a python script (which resides on the SFTP server).
It is necessary for us to ensure the files are transferred using text mode. I don't see this possibility in…
I am trying to list files and its modification time recursively under a directory using pysftp. The problem is, it shows file doesn't exist for all files, but not for directories.
Here is my code:
class SftpOps:
def __init__(self):
…
I'm trying to connect to a remote SFTP server using Python, specifically pysftp. I can connect with no problems using FileZilla or WinSCP on Windows, or sftp on Linux (specifically AWS Linux). The connection fails with the error
SSHException:…
I'm unable to copy files from SFTP server. I'm getting the permission error.
I have tried changing the mode in os.mkdirs() function.
sftp = pysftp.Connection(host = myhostname, username= myusername, password= mypassword, port=22, cnopts=mycn`enter…
I am trying to connect to an sftp server using python on Windows. I cannot connect to the server without a hostkey. A lot of options, especially with pysftp ask for hostkey files which apparently aren't generated on Windows.
From what I can see is…
Last night I was writing my first pySFTP Notebook, and I was able to get it to work. It was working when I went to bed, but now it does not. I get an error on the connection command....
import pysftp
cnopts = pysftp.CnOpts()
cnopts.hostkeys = None …
I want to transfer files from one SFTP server to another.
I don't want to write locally, and I don't want to read the whole file into memory.
Pysftp has getfo and putfo methods.
But getfo doesn't give you a reader -- it gives just writes to an…
Python 3.7.4
Idle 3.7 32-bit
I am attempting to connect to an SFTP and download a .CSV file to a local network drive. When I run my code, I get no error message, but nothing prints in the shell and nothing is being downloaded to my local…