npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-bigssh

v1.2.9

Published

A Big SSH

Downloads

1,636

Readme

node-red-contrib-bigssh

Installation

npm install node-red-contrib-bigssh

Principles for Big Nodes

See biglib for details on Big Nodes. Big Lib and subsequent Big Nodes are a family of nodes built for my own purpose. They are all designed to help me build a complete process for production purposes. For that I needed nodes able to:

  • Flow big volume of data (memory control, work with buffers)
  • Work with a flow of blocks (buffers) (multiple payload within a single job)
  • Tell what they are doing with extended use of statuses (color/message)
  • Use their second output for flow control (start/stop/running/status)
  • Reuse messages in order to propagate _msgid, topic
  • Depends on state of the art libraries for parsing (csv, xml, xlsxs, line, ...)
  • Acts as filters by default (1 payload = 1 action) or data generators (block flow)

All functionnalities are built into a library named biglib and all Big Nodes rely on it

Usage

Big SSH is an input node for node-red to execute command over ssh to a remote host Command can be set as a property of the node. Payload can be used to add arguments to the command and now, the command can be a javascript template string and payload the variables

You've first to set the authentication part which rely on a third party library. You've to test it as ssh always ask for some interactive answer at first try You'need then to set the command, choose how payload are used. Don't forget that you should give the full path of the command as environment is never set once connected on the remote

Dependencies

byline simple line-by-line stream reader

biglib library for building node-red flows that supports blocks, high volume

ssh2 third pary library for executing remote command using ssh

Example flow files

Try pasting in the flow file below that shows the node behaviour. Don't forget to set the credentials :-)

[{"id":"d3b7983c.c97908","type":"bigssh","z":"5f1eb5c5.4b8a5c","name":"","commandLine":"echo \"Welcome ${payload.me} to $(whoami)@$(hostname)\"","commandArgs":"","minError":1,"minWarning":1,"noStdin":false,"format":"","payloadIsArg":true,"myssh":"29df19bc.46db36","x":370,"y":200,"wires":[["477828b0.0ecb68"],["c3649904.a68108"],["743d5a09.a72bd4"]]},{"id":"c3649904.a68108","type":"bigstatus","z":"5f1eb5c5.4b8a5c","name":"","locale":"fr","show_date":true,"show_duration":false,"x":730,"y":200,"wires":[[]]},{"id":"477828b0.0ecb68","type":"bigline","z":"5f1eb5c5.4b8a5c","name":"","filename":"","format":"utf8","keepEmptyLines":false,"x":580,"y":140,"wires":[["614e8cdf.3d7ea4"],[]]},{"id":"614e8cdf.3d7ea4","type":"debug","z":"5f1eb5c5.4b8a5c","name":"stdout","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":140,"wires":[]},{"id":"743d5a09.a72bd4","type":"bigline","z":"5f1eb5c5.4b8a5c","name":"","filename":"","format":"utf8","keepEmptyLines":false,"x":580,"y":260,"wires":[["33a59bcb.34ee64"],[]]},{"id":"33a59bcb.34ee64","type":"debug","z":"5f1eb5c5.4b8a5c","name":"stderr","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":260,"wires":[]},{"id":"7a7fdea4.2ec13","type":"inject","z":"5f1eb5c5.4b8a5c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"me\":\"Mr J\"}","payloadType":"json","x":170,"y":200,"wires":[["d3b7983c.c97908"]]},{"id":"29df19bc.46db36","type":"SSH_Credentials","host":"127.0.0.1","port":"22","userlabel":"[email protected]"}]

alt tag

Author

  • Jacques W

License

This code is Open Source under an Apache 2 License.

You may not use this code except in compliance with the License. You may obtain an original copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Please see the License for the specific language governing permissions and limitations under the License.

Feedback and Support

Please report any issues or suggestions via the Github Issues list for this repository.

For more information, feedback, or community support see the Node-Red Google groups forum at https://groups.google.com/forum/#!forum/node-red

Releases

1.2.9 - 2021/08/03

With "msg.config.uhcred" set on its input, the node will look for this credential configuration and change to it if found. This is related to issue #30