Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

Error: Received exit code 127 while establishing SFTP session #125

Open
rejas opened this issue Oct 18, 2018 · 2 comments
Open

Error: Received exit code 127 while establishing SFTP session #125

rejas opened this issue Oct 18, 2018 · 2 comments

Comments

@rejas
Copy link

rejas commented Oct 18, 2018

Trying to do a deploy my projects build-directory to my remote point with this code from my npm scripts:

#! /usr/bin/env node
const client = require('scp2');

client.scp('build/', 'myuser:[email protected]:/data/webui', (err) => {
    console.log(err);
});

Running on Windows10 I get this error:

> node scripts/deploy.js

C:\Projekte\hp-web\node_modules\scp2\lib\client.js:74
      if (err) throw err;
               ^

Error: Received exit code 127 while establishing SFTP session
    at Channel.onExit (C:\Projekte\hp-web\node_modules\ssh2\lib\client.js:774:19)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at Channel.emit (events.js:211:7)
    at SSH2Stream.<anonymous> (C:\Projekte\hp-web\node_modules\ssh2\lib\Channel.js:189:14)
    at emitOne (events.js:116:13)
    at SSH2Stream.emit (events.js:211:7)
    at parse_CHANNEL_REQUEST (C:\Projekte\hp-web\node_modules\ssh2-streams\lib\ssh.js:4356:8)
    at parsePacket (C:\Projekte\hp-web\node_modules\ssh2-streams\lib\ssh.js:3727:12)
    at SSH2Stream._transform (C:\Projekte\hp-web\node_modules\ssh2-streams\lib\ssh.js:551:1

Am I configuring it wrong or what am I missing here?

@alexis-loumeau
Copy link

alexis-loumeau commented Sep 23, 2019

i'm trying to copy folder and i get the same problem on my windows 10 and on my ubuntu 18.04 server.
Do we miss something?

`/opt/Backend/node_modules/scp2/lib/client.js:74
if (err) throw err;
^

Error: Received exit code 127 while establishing SFTP session
at Channel.onExit (/opt/Backend/node_modules/ssh2/lib/client.js:774:19)
at Object.onceWrapper (events.js:277:13)
at Channel.emit (events.js:189:13)
at SSH2Stream. (/opt/Backend/node_modules/ssh2/lib/Channel.js:189:14)
at SSH2Stream.emit (events.js:189:13)
at parse_CHANNEL_REQUEST (/opt/Backend/node_modules/ssh2-streams/lib/ssh.js:4356:8)
at parsePacket (/opt/Backend/node_modules/ssh2-streams/lib/ssh.js:3727:12)
at SSH2Stream._transform (/opt/Backend/node_modules/ssh2-streams/lib/ssh.js:551:13)
at SSH2Stream.Transform._read (_stream_transform.js:190:10)
at SSH2Stream._read (/opt/Backend/node_modules/ssh2-streams/lib/ssh.js:212:15)
`

@komeilkma
Copy link

i have same issue
any update ?
node -v 14
with scp2 and node-scp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants