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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yousolution/node-red-contrib-you-ftp-sftp

v1.12.0

Published

A node-red node that support FTP and SFTP file transfer using $() environment variables to control the ftp connection details

Readme

@yousolution/node-red-contrib-you-ftp-sftp

npm version Node-RED

Node-RED nodes for FTP, FTPS and SFTP file transfer operations.

Install

npm install @yousolution/node-red-contrib-you-ftp-sftp

Nodes

This package provides three protocol nodes, each with a server config node and an input node:

| Node | Protocol | Auth | Library | |------|----------|------|---------| | ftp + ftp in | FTP (plain) | Password | basic-ftp | | ftps + ftps in | FTP over implicit TLS | Password | basic-ftp | | sftp + sftp in | SFTP (SSH) | Password, SSH Key, PPK | ssh2-sftp-client |

Operations

All three nodes support the same four operations:

| Operation | Description | |-----------|-------------| | list | List files in the working directory | | get | Download a file | | put | Upload a file | | delete | Delete a file |

RENAME - Set msg.payload.filename and msg.payload.newfilename Leave configuration blank to set in code.

DELETE - Set msg.payload.filename to delete the file or will use Workdir + Filename in configuration. Leave configuration blank to set in code.


Server Config Nodes

FTP / FTPS Config

| Field | Type | Default | Description | |-------|------|---------|-------------| | Host | string | localhost | Server hostname or IP | | Port | number | 21 | Server port | | User | string | anonymous | Username | | Password | string | anonymous@ | Password | | Connection Timeout | number | 10000 | Connection timeout (ms) | | PASV Timeout | number | 10000 | PASV mode timeout (ms) | | Keepalive | number | 10000 | Keepalive interval (ms) | | Secure | boolean | false | Use TLS for data channel (FTP only) | | Secure Options | string | — | TLS options (FTP only) |

FTPS forces secure: true and rejectUnauthorized: false.

SFTP Config

| Field | Type | Default | Description | |-------|------|---------|-------------| | Host | string | localhost | Server hostname or IP | | Port | number | 22 | Server port | | Username | string | — | SSH username | | Password | string | — | SSH password | | SSH-Key file | file | — | PEM, OpenSSH, or PPK private key | | PPK Passphrase | password | — | Passphrase for encrypted PPK keys | | hmac | select | hmac-sha2-256,hmac-sha2-512,hmac-sha1 | Allowed HMAC algorithms (multi-select) | | cipher | select | aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm | Allowed ciphers (multi-select) |


Input Node: Message Properties

Input Messages (msg)

| Property | Type | Applicable | Description | |----------|------|------------|-------------| | msg.host | string | All | Override server host | | msg.port | number | All | Override server port | | msg.user | string | FTP/FTPS | Override username | | msg.password | string | All | Override password | | msg.workdir | string | All | Override working directory | | msg.payload.filename | string | get/delete/put | File path (overrides config) | | msg.payload.filedata | string/Buffer | put | File content to upload | | msg.ppkpassphrase | string | SFTP only | Override PPK passphrase at runtime |

Output Messages (msg)

| Operation | Output | |-----------|--------| | list | msg.payload — Array of file entries | | get | msg.payload.filedata — File content, msg.payload.filename — Remote path | | put | msg.payload.filename — Remote path of uploaded file | | delete | msg.payload.filename — Deleted file path |

Status

The node updates its status indicator during operations:

| Status | Description | |--------|-------------| | 🟡 connection... | Connecting to server | | 🟢 connected | Connected successfully | | 🟢 list done / get done / put done / delete done | Operation completed | | 🔴 connection failed. | Connection failed | | 🔴 list failed / ... | Operation failed | | 🟡 converting PPK... | PPK key conversion in progress (SFTP only) |


Authentication

FTP / FTPS

Username and password only.

SFTP

The SFTP node supports three authentication methods (tried in order):

  1. SSH Private Key (PEM or OpenSSH format)

    • Upload the key file in the node config, or
    • Set the SFTP_SSH_KEY_FILE environment variable
  2. PPK Key (PuTTY format, v2 and v3)

    • Upload the .ppk file in the node config
    • If the PPK is encrypted, provide the passphrase
    • The node automatically converts PPK to PEM using ppk-to-openssh
    • Supports all key types: RSA, DSA, ECDSA (P-256/P-384/P-521), Ed25519
    • Supports PPK v3 with Argon2id key derivation
  3. Password (fallback if no key is provided)

Pass the passphrase for encrypted keys via the config UI or at runtime via msg.ppkpassphrase.


Environment Variables

| Variable | Description | |----------|-------------| | SFTP_SSH_KEY_FILE | Path to an SSH private key file (PEM/OpenSSH/PPK). Resolved relative to the project root. |


Examples

Upload a file

msg.payload = {};
msg.payload.filename = "/remote/path/file.txt";
msg.payload.filedata = "file content";
return msg;

Download a file

msg.payload = {};
msg.payload.filename = "/remote/path/file.txt";
return msg;

List directory

msg.workdir = "/remote/path/";
return msg;

Delete a file

msg.payload = {};
msg.payload.filename = "/remote/path/file.txt";
return msg;

Override connection at runtime

msg.host = "192.168.1.100";
msg.port = 22;
msg.user = "admin";
msg.password = "secret";
msg.ppkpassphrase = "my-ppk-passphrase"; // for encrypted PPK keys
return msg;

Changelog

See history.md.

License

Apache 2.0 — see LICENSE.