Different results with node-ssh and my terminal ssh connection

Open
#410 11 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
node.js
Domain
backend

Research direction

The issue names only ssh.execCommand('nvm install node') and no file or test. Compare the environment used by terminal SSH with the one used by execCommand, then determine whether the project needs a documented usage change or a code fix; completion criteria are not specified.

Written by the indexing model from the issue text.

Description

external question

Hi
I'm using node-ssh to run this command in a remote machine

nvm install node

When my code sends this command via ssh.execCommand('nvm install node') the response is bash: nvm: command not found

But when I personally connect to that server via my terminal, it just runs fine. Without any errors. why?

Dominant language
TypeScript
Stars
1k
Forks
94
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from steelbrain/node-ssh

All issues in steelbrain/node-ssh

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.