GithubHelp home page GithubHelp logo

novski / ssh-exec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from insectos/node-red-ssh-exec

0.0 1.0 0.0 101 KB

NodeRED Node for SSH

License: Apache License 2.0

JavaScript 73.90% HTML 26.10%

ssh-exec's Introduction

@insectos/ssh-exec

Node that establishs a ssh terminal connection to a remote host. The remote host can be selected from ~/.ssh/config and supports ssh keys. Wrapper around ssh2

Usage

Select a host from the dropdown or provide manual configuration. Connection to the host will happen on first data received. Connections are reestablished as needed.

Use a Catch node to see what errors are thrown from the SSH node that aren't already being caught and handled.

Input

msg.payload <string> = The command that you wish to be sent to the remote shell msg.sshhost <string> = OPTIONAL overwrite the configured hostname, must exist in .ssh/config Once overwritten all following commands go to the new host

Output

msg.payload <string> = The text printed to STDOUT on the remote shell

msg.host = The IP address of the connected host. This is also returned on errors so can be used in conjunction with the Catch node so only one Catch node is needed to watch all uses of the Interactive SSH node.

WIP

  • backfill unit tests

Credits

Inspired by node-red-contrib-interactive-ssh. Since the connection mechanism was completely redesigned, a new package is warranted

Change log

v0.3.5

  • Change package name to @insectos\node-red-ssh-exec
  • Contributed by @novski: read Hostname & HostName
  • Return msg now includes original msg object custom properties

v0.3.2

  • added sshpassword to the msg object to be able to pass in a sshkey passphrase
  • upgraded ssh-config to 4.4.0
  • fixed issue where password was ignored when selecting host that doesn't have a key file

v0.3.1

  • added a check for the .ssh/config file

v0.3.0

  • Reorganised source to be more testable
  • moved password to (encrypted) credentials
  • node name shows host from .ssh/config
  • fixed handover of ssh passphrase
  • added example flow

ssh-exec's People

Contributors

stwissel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.