Questions tagged [ssh2-sftp-client]

40 questions
1
vote
1 answer

Programmatically move files from an S3 bucket to a Windows EC2 and vice-versa

I want to push files to a Windows EC2 and also get folders from my EC2 and store it in S3. As I have many EC2s, I wanted to automate this - I currently have a Node.js server on ECS that uses ssh2-sftp-client library. With the following piece of code…
1
vote
1 answer

SSH2 SFTP Client debug logging and event subscription

Im using the https://www.npmjs.com/package/ssh2-sftp-client library and have the following working code. async function upload() { let sftp = new Client(); await sftp.connect(config) .then(() => { return…
user1513388
  • 7,165
  • 14
  • 69
  • 111
0
votes
0 answers

REACT getCiphers is not a function at ./node_modules/ssh2-sftp-client/node_modules/ssh2/lib/protocol/keyParser.js

Sto provando ad usare la libreria 'ssh2-sftp-client' ma nel momento in cui faccio la dichiarazione let Client = require('ssh2-sftp-client') va in errore, qualcuno mi può aiutare? Grazie getCiphers is not a function at…
0
votes
0 answers

How to limit number of simultaneous connection in ssh2-sftp-client npm

I am using ssh2-sftp-client for making an SFTP connection. I need to limit the number of simultaneous connections to ONE. I don't see such setting in the documentation https://github.com/theophilusx/ssh2-sftp-client. Please help
irfan rasool
  • 158
  • 1
  • 2
  • 12
0
votes
0 answers

SFTP issue from SAP BTP NodeJS

I m trying to read files from SFTP location using the following class: SFTPClient.js: let Client = require('ssh2-sftp-client'); class SFTPClient { constructor() { this.client = new Client(); } async connect(options) { …
0
votes
0 answers

Typescript ssh2-sftp-client module's get and fastGet downloading 0 byte zip files

I am using ssh2-sftp-client to connect to an sftp server and download files. I know the connection is working as I can download the files but I am getting 0 byte zip files. this._connection is a ssh2-sftp-client object. file is the name of the…
foxRun28
  • 13
  • 4
0
votes
0 answers

Failed to connect: Error: connect: getConnection: All configured authentication methods failed

I develop a function for my bot discord, and I want to connect to a sftp server with the module ssh2-sftp-client. For my project, I have several directories, but for my case, I only need to give you 2, in the folder "functions", there are two files,…
Avime
  • 1
0
votes
1 answer

Defining a property via process.env in javascript

I'm new to JavaScript and stuck. I'm writing my first "real" Electron App and want to connect via sftp. (ssh2-sftp-client to be more specific) When I set up the connection like the example: sftp.connect({ host: '192.168.76.173', port: '22', …
0
votes
0 answers

Error: connect: Remote host refused connection (nodejs + ssh2-sftp-client + docker)

I am facing issue while connecting SFTP with Error: connect: Remote host refused connection using docker. FYI it is working fine/as expected without docker. Logs without docker (where the SFTP connection successfully established) CLIENT[sftp]:…
0
votes
0 answers

javascript, node js, ssh2-sftp-client

my code initialy i am uploading image to my local public server where code is running using fs mv method then i am giving local path , server path ubuntu, some times it is uploading some times it shoing this error i dont know why please help me on…
0
votes
0 answers

File is already exclusively open

Beginner coder here, so apologies in advance for any messy code or lack of understanding! I'm writing a small automation code with Node.js that uses a webhook to create a quick CSV file in a SFTP location. I have most of the base code written out…
asherl91
  • 1
  • 1
0
votes
0 answers

Option we can pass to change max packet size for ssh2-sftp-client?

I'm using ssh2-sftp-client to list files and I'm coming across this issue: list: Packet length 281213 exceeds max length of 262144 Looks like ssh2-sftp-client is a wrapper for the library ssh2 When I look the source code for ssh2, I see the max…
RJK
  • 226
  • 1
  • 6
  • 22
0
votes
1 answer

NodeJS ssh2-sftp-client | connecting to SFTP using public key and a passphrase

I'm having a problem connecting to SFTP server using public key and a passphrase. I've tried the following code but it is infinitely calling the callback function. I appreciate any input. Thank you. let sftpClient =…
M.K.
  • 23
  • 1
  • 3
0
votes
1 answer

ssh2-sftp-client file upload incomplete when listening to streams data event

I upload files via ssh2-sftp-client by passing a readStream. That works fine, but when I add an event listener the files are not completely uploaded: This works: const stream = fs.createReadStream(myFile); return this.sftpClient.put(stream,…
Nico
  • 1
  • 2
0
votes
1 answer

How to connect to SFTP server in Cypress test?

I am trying to connect to an SFTP server using the ssh2-sftp-client NPM package in my Cypress test. Here is my test at the moment describe('example to-do app', () => { it('displays two todo items by default', () => { let Client =…
user9847788
  • 2,135
  • 5
  • 31
  • 79