Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
141 views

SFTP server in Python with Paramiko does not allow SFTP connections

I rewrote the question because it didn't fit underneath. I'm trying paramiko library, in python, to configure an SFTP Server. I start defining a ROOT_FOLDER to the path of my wished one. Then i exend ...
MagoLione's user avatar
0 votes
1 answer
103 views

Old SFTP Issue: paramiko.ssh_exception.SSHException: Incompatible ssh peer (no acceptable host key)

Error: paramiko.ssh_exception.SSHException: Incompatible ssh peer (no acceptable host key) Paramiko Version: 2.8.1 [cannot update unfortunately] Debug Logs: DEBUG:paramiko.transport:starting thread (...
LearnerJS's user avatar
  • 299
0 votes
1 answer
66 views

"TypeError: string argument without an encoding" when retrieving an ORM object

I'm trying to set up an SFTP server in python, using paramiko library. I'm using a PostgreSQL to store users credentials, by SQLAlchemy library. When I try to login using FileZilla or WinSCP to the ...
MagoLione's user avatar
-1 votes
1 answer
78 views

Sftp paramiko and sshd-mina not able to write on remote server even if no error. On local sftp server it works though

I'm just showing the code used to try to upload a file in sftp: # Check file size def check_file_size(path): try: size = os.path.getsize(path) print(f"Local file size: {size} ...
SGiux's user avatar
  • 849
0 votes
0 answers
42 views

configure django storages with sftp server , docker local project

I was trying to configure django-storages to use sftp server to upload static and media to the sftp, however when I do collectstatic it shows "timeout" error here is my django conf. USE_NNUH ...
Israa Salameh's user avatar
0 votes
1 answer
77 views

Convert paramiko.sftp_file.SFTPFile object to unicode

What I need, is to copy a .csv file from an SFTP server to a Google Cloud Storage bucket without downloading the file locally. Here is my code so far: from google.cloud import storage import io ...
Maximuluss's user avatar
0 votes
0 answers
19 views

Paramiko - SFTP server removes files before they are uploaded [duplicate]

I am using paramiko to send pdf and csv files to an sftp server. The client is telling me that some files arrive on the server but I keep getting the error: Failed to upload 180.pdf for order 180: [...
Eugen 's user avatar
0 votes
0 answers
77 views

Pytest/Unittest SFTP Client Connection

I've written a function that establishes and returns an SFTP client connection. Here is the code: import paramiko from io import StringIO from fastapi import HTTPException def get_sftp_client( ...
daniel guo's user avatar
0 votes
0 answers
117 views

SFTP file transfer time stamp

I am writing a python script to check how long the file is staying in the SFTP. Every minute the script will run and it'll check if the file is there or not. Here's a part of the script checking the ...
Vaishant Sah's user avatar
0 votes
1 answer
86 views

Failing to pass a downloaded file-like object from sharepoint using the shareplum and paramiko libraries

I'm receiving an error when passing a file object using paramiko's putfo(). AttributeError: 'bytes' object has no attribute 'read' Here's what my putfo() looks like ssh_client = paramiko.SSHClient() ...
BlakeB9's user avatar
  • 617
1 vote
1 answer
392 views

How to use pysftp with the -o"HostKeyAlgorithms=+ssh-rsa" -o"PubkeyAcceptedKeyTypes=+ssh-rsa" options?

Using paramiko I want to select the list of pubkey algorithm my key is in, do you know how I can run a similar command like: sftp \ -i private_key.pem \ -P 22 \ -o"HostKeyAlgorithms=+...
Natim's user avatar
  • 18.1k
0 votes
1 answer
105 views

Paramiko Put - Send SFTP succeed but I got an error message [duplicate]

I am sending a file through a SFTP server which is known to be difficult (PORT: 1002_) The file is going through but I still have the error ssh_Client = pmiko.SSHClient() ssh_Client....
Josiane's user avatar
  • 13
2 votes
1 answer
66 views

Pass/fail result for Paramiko SFTPClient get() and put() functions?

I'm writing an Ansible module using Paramiko's SFTPClient class. I have the following code snippets import paramiko from ansible.module_utils.basic import * def get_sftp_client(host, port, user, ...
Chris F's user avatar
  • 16.6k
1 vote
1 answer
583 views

Get file's creation timestamp using Paramiko SFTP

Any idea if there is actually a way to get "ctime", a file's created timestamp from a SFTP server? Using Paramiko for SFTP, I am only seeing "atime" and "mtime". ...
TallGibbs's user avatar
0 votes
1 answer
176 views

Implementing server-side file copy with Paramiko SFTP: Need guidance on custom extensions

I am currently working on a project that involves server-side file copy operations using Paramiko's SFTP on the server side. I am seeking guidance on how to implement server-side file copy operations ...
TWTom's user avatar
  • 17
-2 votes
1 answer
225 views

How does the confirm parameter of the paramiko put work

I noticed, that there is a parameter named confirm for the put method of the paramiko package. I want to know how it works. what is its function? and how to test it.
user571102's user avatar
1 vote
1 answer
2k views

How to download all the files from today from SFTP server with Paramiko?

I am beginner in Python and I am trying to download all files, that were added today from SFTP server using Paramiko. I have found this question which explains how to download the latest file: How to ...
refokaj's user avatar
  • 17
1 vote
1 answer
456 views

Listing files with Paramiko returning UnicodeDecodeError: 'utf-8' codec can't decode byte

I'm trying to download files from SFTP using Paramiko and Python. I didn't find any solution to avoid the unicode error. It works using the sftp.get() method but I must filter filenames first because ...
Alexandre Barrère's user avatar
0 votes
1 answer
608 views

Negotiation failed while trying to connect to SFTP server using Paramiko, but command line SFTP works properly. Same failure with js ssh2-sftp-client

I am trying to move files into an SFTP server at 8001 port using code and not just GUI and command line tools. FileZilla, sftp CLI in Windows and Linux works just fine. But somehow the Python code or ...
Dan Alex's user avatar
1 vote
0 answers
375 views

Transfer files directly from one SFTP server to another?

I have files within directories that needs to be transferred from one SFTP server to another. Common ways I have found are to download the files from server 1 and then transfer them to server 2. My ...
Safiul Alam's user avatar
-1 votes
1 answer
532 views

Paramiko SFTP error when trying to upload

This is the code: @app.route('/success', methods=['POST']) def success(): try: now = datetime.now() dt_string = now.strftime("%d/%m/%Y %H:%M:%S") print("You ...
VladAndrei's user avatar
0 votes
1 answer
753 views

Convert .ppk file to .pem with tempfile using python

I want to write a fast-API endpoint with functionality that gets .ppk file and converts it to .pem to get connect to SFTP to download some files using Python without storing them in the local system. ...
hungry_in_learning's user avatar
-2 votes
1 answer
148 views

Exception while trying to initialise paramiko.SFTPClient on a Dropbear SSH Server with EMPTY Password

I need to open an SSHClient and an SFTPClient to an SSH Server which is not having a password. After a lot of googling I found a way to initialize the SSHClient with empty password but I couldn't ...
Bijesh Mohan's user avatar
1 vote
1 answer
106 views

Paramiko sendcmd like in Python ftplib

I have a host system with two systems on it (HP Nonstop). With Python ftplib I can use ftp = FTP() ftp.encoding = encoding ftp.connect(host_addr, ftp_port) ftp.sendcmd('guardian') to use the Guardian ...
Ezak's user avatar
  • 137
-1 votes
1 answer
937 views

New K8 pods does not connect to SFTP server

Currently, the application that is running as a containerized K8 spins up a new K8 pod every time and the new pod tries to connect to an sftp server. Somehow the new pod always fails to connect to the ...
Harish's user avatar
  • 603
1 vote
0 answers
399 views

fsspec - is there a way how we can get paginated response from sftp?

I use fsspec which uses in-built capabilities of paramiko but could not really find a way how we can paginate the response. Is there a way to have that functionality over here? The use-case is like ...
LearnerJS's user avatar
  • 299
2 votes
1 answer
7k views

Randomly getting "Error reading SSH protocol banner" in Paramiko

I am trying to transfer CSV file from one server to another using Paramiko, SSH connection. I never had any issues with all transfers, but for some random files, I have that: SSHException: Error ...
Vikas Sharma's user avatar
1 vote
1 answer
3k views

Paramiko "OSError: Failure" when trying to put large file to SFTP server

My task is to perform some action on data queried from a database and then store the output on an SFTP server. The script performing all of this is executed on a VM running Windows Server 2016 ...
andrea's user avatar
  • 535
1 vote
2 answers
2k views

Paramiko SFTPClient class throws "Authentication failed", but Transport class and WinSCP work

I have an issue using Paramiko and connecting to an SFTP server. The connecting work fine using same credentials in WinSCP. I am also able to use pysftp. But I would prefer to be able to use Paramiko, ...
jakobdo's user avatar
  • 1,302
1 vote
1 answer
927 views

Python OSError: Failure with SFTP

I'm testing SFTP communication on a Windows 11 laptop with SFTP server running at localhost:3373. An sftp.get request generates an "OSError: Failure" error with this code: import pysftp ...
Henry Thornton's user avatar
1 vote
1 answer
1k views

Transferring SFTP files using Paramiko fail with "FileNotFound: [Errno 2] No such file" [duplicate]

I am trying to put together an SFTP module for use with a drone in a project for school. Security is not a concern for me right now, as I am simply trying to get successful connections and file ...
Selovanth's user avatar
1 vote
1 answer
1k views

Problem connecting to SFTP using Paramiko

This is the snippet of the code I have been using to connect to an SFTP to pull files. It's a basic sftp connection using paramiko in Python. def get_fund_files(): host, port = "ftp.example....
Imerial's user avatar
  • 25
1 vote
1 answer
5k views

Paramiko RSAKey "private key file is encrypted"

I'm trying to use Paramiko to connect to an SFTP site. "paramiko": { "hashes": [ "sha256:...
Jeremy Farmer's user avatar
1 vote
1 answer
634 views

Cannot copy/move file from remote SFTP server to local machine by Paramiko code running on remote SSH server

I want to copy a file from my SFTP server to local computer. However, when I run my code, it didn't show any error while I still cannot find my file on local computer. My code like that: import ...
4daJKong's user avatar
  • 2,035
-2 votes
1 answer
635 views

How to send data from a file in a Python docker container to remote SFTP server?

I have a Python script I am trying to run in a Docker container to send a file that is on this container to an SFTP server. I tried the following : import paramiko ssh=paramiko.SSHClient() ssh....
lbened's user avatar
  • 85
0 votes
0 answers
122 views

Error 500 when trying to send file from remote server (python code) to an SFTP server

I have a Flask API in a Docker container where I do the following : from flask import Flask, request import os import json import paramiko import subprocess app = Flask(__name__) @app.route("/&...
lbened's user avatar
  • 85
0 votes
1 answer
700 views

OSError: Int or String expected received with pysftp.Connection in kubernetes

I am trying to connect SFTP server using pysftp. I receive below error on pysftp.Connection() in Jupyter notebook running in Kubernetes inside IBM Elyra. Python version is 3.7.6 and pysftp 0.2.9 with ...
arundeep78's user avatar
0 votes
2 answers
1k views

How to check if Paramiko SFTP client is still open

How do I check sftp client opened earlier via Paramiko is still active throughout self.sftp = ssh.open_sftp() My application logic at times keeps the SFTP connection idle from anywhere between 0.5 ...
chirag7jain's user avatar
  • 1,527
-1 votes
1 answer
378 views

Is there a way to reach a SFTP server from a serverless service (or local) with a tunnel machine in between?

I'm building a serverless service (AWS lambda) to get/put files in SFTP server on a daily basis. The only way to access the SFTP server is from another machine (an AWS EC2 instance) which has it's IP ...
felipe_franceschini's user avatar
0 votes
1 answer
885 views

Paramiko Python. How can i get the last modified file on the SFTP? [duplicate]

I need to get the last modified file's name using paramiko client.connect(hostname=server["host"], username=server["user"], pkey=pkey, allow_agent=False, look_for_keys=False) ...
Gabriel Vieira Lima's user avatar
1 vote
0 answers
275 views

PySFTP file transfer suddenly slower than before

Background: I have a python backup script on a local server that runs periodically every night at midnight and transfers files from a remote server to the local one using pysftp. It ran perfectly fine ...
Nab's user avatar
  • 36
2 votes
1 answer
1k views

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 ...
Shubham Bansal's user avatar
1 vote
1 answer
321 views

"No such file" while trying to download file with backslash and space in filename with Paramiko

Trying to create local server. When downloading to client files without whitespaces such as abc.txt, hello-world.png everything works. But there is a problem with downloading files like hello\ world....
A Little Coder's user avatar
1 vote
1 answer
310 views

"OverflowError: mode out of range" in Python when working with file mode/attributes returned by Paramiko

I am trying to make a SFTP script to go through a directory and get all the files in it, inside this directory there are subdirectories that I would like to exclude. However when I use the stat....
Duvan Chaves's user avatar
1 vote
1 answer
716 views

Getting "not a valid RSA private key file" when loading key to Python Paramiko from Key Vault

I am trying to connect to a SFTP that use username, passphrase, SSH key (no password needed) in notebook in Synapse. SSH key is kept as a secret in Key Vault. Host = "sftp.xxxxx.no" Username ...
Jing's user avatar
  • 13
0 votes
1 answer
556 views

How to put/stream data into an Excel file on sftp

What works With the following code, I can write the content of TheList into a CSV on an SFTP. import paramiko import csv # code part to make and open sftp connection TheList = [['name', 'address'], [...
Gamsner's user avatar
  • 167
2 votes
1 answer
1k views

How to put data into a tempfile and post as CSV on SFTP

Goal is Create a temporary SCP file filled with data and upload it to an sftp. The data to fill is TheList and is from class list. What I am able to achieve Create the connection to the SFTP Push a ...
Gamsner's user avatar
  • 167
0 votes
1 answer
213 views

Python paramiko get command path syntax [duplicate]

I am looking to download files from an sFTP server to my local computer and would like to specify where the files go as they download. I've successfully connected to an sFTP server using this code: ...
Tyler Moore's user avatar
1 vote
1 answer
856 views

Set SFTP server host public key in Paramiko with non-default port

I am trying to set a known host public key before establishing the connection. I have tried using the public key file the partner shared with me, but I wasn't able to connect, so now I am trying to ...
Luiscri's user avatar
  • 1,023
1 vote
1 answer
503 views

How to display image file from sftp remote server in django template?

We have 2 servers. One of them is for media files and the other one is for django project server(ngnx+gunicorne). Our media server is local(internal). We want to access to media server from inside the ...
Feyza Kılıç's user avatar

1
2 3 4 5
9