Questions tagged [pysftp]

pysftp is a thin wrapper over paramiko's SFTPClient.

pysftp is a thin wrapper over 's SFTPClient.

372 questions
-1
votes
1 answer

Unclear if either Pysftp or Dropox is lagging when creating and pushing a file to an SFTP server?

I am having a strange problem with pysftp. My code creates a text file and then almost immediately pushes this to an SFTP server using the pysftp lib. The text file that is created and then pushed is saved on a Dropbox folder. Intermittently I get…
Andy
  • 919
  • 2
  • 9
  • 22
-1
votes
1 answer

How to enable keyboard-interactive authentication in python with pysftp/paramiko?

I am able to sftp into both SERVER1 and SERVER2 (specified above). I can use the command line to sftp into both SERVER1 and SERVER2, no problem. However, when I attempt to use python 3.7 (pysftp) to connect to SERVER2 I get…
tka3214
  • 33
  • 2
  • 6
-1
votes
1 answer

AttributeError: 'NoneType' object has no attribute 'open_sftp'

I am trying to fetch the data from SFTP from some particular folder but getting the following issue: File "/usr/local/airflow/plugins/kyber/sftp_to_s3_operator.py", line 59, in execute sftp_client = ssh_client.open_sftp() AttributeError:…
-1
votes
1 answer

paramiko - How to connect a remote server from sudoer instance

1 - Verified whether paramiko code able to connect to instance with sudo access 2 - After above succesful run, I tried to execute this command - ssh_client.exec_command(command) command = sudo su - abc -c 'sftp -o -o Port=22…
dev
  • 15
  • 5
-1
votes
1 answer

Python tqdm TypeError: () takes 1 positional argument but 2 were given

I tried to create a progress bar to view progress of file transferring by using the below code. from tqdm import tqdm import pysftp cnopts = pysftp.CnOpts() cnopts.hostkeys = None srv =…
Harshana
  • 5,151
  • 1
  • 17
  • 27
-1
votes
1 answer

Cannot install pysftp paramiko python

If I try to install the above packages using setup.py install. I get download error on https://pypi.python.org/simple/ecdsa: timed out -- Some packages may not be found! Error:could not find suitable distribution for…
sai kiran
  • 37
  • 1
  • 8
-1
votes
2 answers

python paramiko sftp on Windows returns 'FileNotFound [WinError2]' when trying to use sftp.put(localpath, remotepath)

I'm trying to upload a simple file from my local host (Windows) to a remote machine (UNIX) using Python 3.3 Here's the code: import os import Crypto import paramiko import pysftp localpath = "C:\\py.txt" remotepath = "/tmp/py.txt" s =…
Chen A.
  • 10,140
  • 3
  • 42
  • 61
-2
votes
1 answer

Iterate over the files from a sftp location and pick the latest received file using python

For example, my filename present in the sftp location is as follows: AG_DMW_2021052003_5150236 AG_DMW_2021051903_5150236 AG_DMW_2021051803_5150236 AG_DMW_2021051703_5150236 I need to pick only the File #1 using the python code from the…
Gowtham_7
  • 217
  • 1
  • 8
-2
votes
1 answer

To download the folder from sftp server, It downloading the folder in local directory but when i am giving particular file path then its showing error

I am attaching the below code please give the solution any one. When I am giving the remote path such as: /file/ICC1/log.txt and local path : E:\abc Then it's showing error raise IOError(errno.ENOENT, text) IOError: [Errno 2] No such file import…
-2
votes
2 answers

list files inside SFTP with Python to download files listdir

I have to download some files from sftp using Python, I've tried to use listdir to list all of them, but my first attempt to use pysftp.listdir I receive this message : "module 'pysftp' has no attribute 'listdir' import pysftp cnopts =…
user202135
  • 43
  • 8
-2
votes
1 answer

How to put password with "\n" inside in any python ftp connection?

I have an interesting problem - I need to connect to an FTP/SFTP server from Python3 code, but the password contains \n symbol inside. When I paste the password in the FTP/SFTP bash client, it works. But if I use pysftp or ftplib, authentification…
V.Kuimov
  • 1
  • 4
-3
votes
3 answers

Python - If statement, error local variable 'newfile' referenced before assignment

I have following Python 2.7 script. The script iterates through a CSV file that contains filenames, it then looks on an FTP server to try and find the filenames. However, I get an error when the file isn't found on the ftp: error local variable…
Nick Edwards
  • 55
  • 1
  • 10
1 2 3
24
25