Questions tagged [ssh2-sftp-client]

40 questions
4
votes
1 answer

Node.js ssh2-sftp-client Error: fastPut: No response from server Local

I am using node -v v14.17.0 and "ssh2-sftp-client": "^7.0.0" and method fastPut https://github.com/theophilusx/ssh2-sftp-client#sec-5-2-9 Checking the remote files is okay, so connection works. My environment is wsl2 Ubuntu-20.04 Problem I face is…
eemilk
  • 1,375
  • 13
  • 17
3
votes
1 answer

SFTP through HTTP proxy using ssh2-sftp-client library in Node.js

I need to transfer files using the Node.js library ssh2-sftp-client. My problem is I need to connect through an HTTP Proxy. The documentation has a step for SOCKS proxy. I am wondering how this can be achieved with HTTP proxy.
Jiji
  • 1,092
  • 3
  • 15
  • 36
3
votes
1 answer

Failure code 4 while uploading file to SFTP server using Node.js

I have written code to establish a SFTP connection and transfer files to the SFTP server using Node.js sftp.put command. I'm getting the following error while transferring the file. I can establish the connection successfully. But I cannot…
20mss054
  • 55
  • 1
  • 5
3
votes
1 answer

Node.js - ssh2-sftp-client getting multiple files error

I use ssh2-sftp-client to get some files. If I use sftp.end(); at the end I get this error in the console: { Error: fastGet->exists->exists: No SFTP connection available at Object.formatError…
Philipp M
  • 3,306
  • 5
  • 36
  • 90
3
votes
3 answers

Error: Connecting to a SFTP server with ssh2-sftp-client in a AWS lambda function throws a time out

I'm trying to connect to a SFTP-Server and list the documents in the /ARCHIVE Folder. Credentials are stored in a .env file. When I run this on my local machine it works and lists the documents. async function main (event){ let Client =…
Alex Strutz
  • 61
  • 1
  • 1
  • 7
1
vote
0 answers

SSH.Net error "The connection was closed by the server: Failed to read binary packet data! (ProtocolError)"

I use SSH.Net nuget package to connect to my partner SFTP Server and getting the error The connection was closed by the server: Failed to read binary packet data! (ProtocolError). Here is my code: var methods = new…
Rango
  • 1,954
  • 4
  • 14
  • 14
1
vote
0 answers

ssh2-sftp-client throwing an error when client function is passed as parameter

I'm using the ssh2-sftp-client library with Typescript to connect to an sftp server - the connection works, however when I create a wrapper function to include the 'connect' and 'end' functions around the main function call I get an error from the…
dandgore
  • 11
  • 2
1
vote
1 answer

Typescript: ssh2-sftp-client trouble connecting to sftp server while FileZilla can

I have searched stackoverflow and google extensivly and not found a solution yet. Using Typescript, node v16.18.0 and ssh2-sftp-client, the code below can successfully connects to my sftp server (hosted on IIS) which requires a username, password…
spacedog
  • 446
  • 3
  • 13
1
vote
0 answers

ssh2-sftp-client put method returns ENOENT: no such file or directory, open

I'm trying to write a simple csv file to a server using sftp. Here's my code: const insertSftpFiles = async (sftp: SFTPClient, path: string, countryCode: CountryCode, archivePath: string, file: any, connectionConfig: any) => { const csvData =…
Nigel
  • 985
  • 1
  • 11
  • 16
1
vote
0 answers

Read file data as a stream using ssh2-sftp-client

Hi I am trying to read a file from a remote sftp server using 'ssh2-sftp-client' module. I need to create a function to read file from sftp and return the stream to the calling function . In the below snippent I am getting a buffer as response to…
1
vote
0 answers

SFTP upload not working in lambda function in Node.js

I am trying to upload single or multiple files from local folder to sftp folder using ssh2-sftp-client in Node.js. I am trying to upload files using Promise.all. The code works fine when tested locally, but when I upload the code to the AWS lambda.…
G S M
  • 29
  • 2
1
vote
1 answer

"multer-sftp": Permission denied when writting on remote sftp server

I am using multer-sftp to make a safe file upload. But when I try to write (upload) file to the server, I get weird error. Can someone help me to solve the issue ? I use "multer-sftp": "^1.1.1", "ssh2-sftp-client": "^7.1.0" and "express":…
1
vote
1 answer

Nodejs: Not able to download file from sftp server

I'm trying to download files from sftp in nodejs, I created sftp using springboot I'm able to connect and do get() and put() operation using python/Winscp/ssh commands. I'm able to connect with my SFTP server but its not downloading the file, it…
1
vote
1 answer

Jest test a function integrated with the ssh2-sftp-client library

I need to test a function that write a file from local path to remote path on an sftp machine using shh2-sftp-client library. my own function is the following: //fileshareAPI.js saveFile: function saveFile(folder, filename, file) { …
1
vote
0 answers

"Module not found: Error: Can't resolve" errors

I am trying to use ssh2-sftp-client package 5.3.1 version with Angular 9.0.4 but getting so many errors like; ERROR in ./node_modules/ssh2-sftp-client/lib/http-agents.js Module not found: Error: Can't resolve 'https' in…
1
2 3