{"_id":"@digitalnodecom/node-red-contrib-best-sftp","_rev":"3-ec3bd7849f2e77368b1a7c2ed1c15af8","name":"@digitalnodecom/node-red-contrib-best-sftp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@digitalnodecom/node-red-contrib-best-sftp","version":"1.0.0","keywords":["node-red","sftp","ssh","file-transfer","ftp"],"author":{"name":"Trajche","email":"trajche@kralev.eu"},"license":"MIT","_id":"@digitalnodecom/node-red-contrib-best-sftp@1.0.0","maintainers":[{"name":"trajcheee","email":"trajche@kralev.eu"},{"name":"riste","email":"riste@digitalnode.com"},{"name":"bojanataseva","email":"bojana@digitalnode.com"},{"name":"kic10","email":"hristijan@digitalnode.com"}],"homepage":"https://github.com/digitalnodecom/node-red-contrib-best-sftp#readme","bugs":{"url":"https://github.com/digitalnodecom/node-red-contrib-best-sftp/issues"},"dist":{"shasum":"8464d1ca9c64b95e50ec8516a914da86045584c7","tarball":"https://registry.npmjs.org/@digitalnodecom/node-red-contrib-best-sftp/-/node-red-contrib-best-sftp-1.0.0.tgz","fileCount":6,"integrity":"sha512-wmrGVJPUOsQA614/2jvJ9qvVVVahN8eJaT/6XWO6Gk6CjSnFXG5zTn6t2fOr4Wc2lcgGiRVYQi7k+YwZT0X/og==","signatures":[{"sig":"MEUCIQCpXuCmQeIobyky3c/JS8i2t25p3vLj3ZMkD/IpB28vVgIgStdrNelImvaJlrS15JoJAfvg5tC1nkYfSEkdltHkMGI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27842},"jest":{"testMatch":["**/test/**/*_spec.js"],"testTimeout":10000,"testEnvironment":"node"},"engines":{"node":">=18.0.0"},"gitHead":"582181098805f1ca2ed14c98aa51b3836ee1c38b","scripts":{"test":"jest"},"_npmUser":{"name":"trajcheee","email":"trajche@kralev.eu"},"node-red":{"nodes":{"sftp-best":"nodes/sftp.js","sftp-config":"nodes/sftp-config.js"},"version":">=2.0.0"},"repository":{"url":"git+https://github.com/digitalnodecom/node-red-contrib-best-sftp.git","type":"git"},"_npmVersion":"11.6.2","description":"Reliable SFTP client node for Node-RED with keyboard-interactive auth support","directories":{},"_nodeVersion":"24.11.1","dependencies":{"ssh2-sftp-client":"^12.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","node-red":"^4.1.3","node-red-node-test-helper":"^0.3.6"},"_npmOperationalInternal":{"tmp":"tmp/node-red-contrib-best-sftp_1.0.0_1768335974683_0.8024549746518619","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-01-13T20:26:14.533Z","modified":"2026-01-13T22:33:52.784Z","1.0.0":"2026-01-13T20:26:14.847Z"},"bugs":{"url":"https://github.com/digitalnodecom/node-red-contrib-best-sftp/issues"},"author":{"name":"Trajche","email":"trajche@kralev.eu"},"license":"MIT","homepage":"https://github.com/digitalnodecom/node-red-contrib-best-sftp#readme","keywords":["node-red","sftp","ssh","file-transfer","ftp"],"repository":{"url":"git+https://github.com/digitalnodecom/node-red-contrib-best-sftp.git","type":"git"},"description":"Reliable SFTP client node for Node-RED with keyboard-interactive auth support","maintainers":[{"email":"trajche@kralev.eu","name":"trajcheee"},{"email":"simon@digitalnode.com","name":"simonanastasov"}],"readme":"# @digitalnodecom/node-red-contrib-best-sftp\n\nA reliable SFTP client node for Node-RED with keyboard-interactive authentication support.\n\n## Features\n\n- **Multiple authentication methods**: Password, keyboard-interactive, and SSH private key\n- **9 SFTP operations**: list, get, put, delete, mkdir, rmdir, rename, exists, stat\n- **Keyboard-interactive auth**: Works with servers that require interactive authentication\n- **Dynamic configuration**: Override settings via message properties\n- **Status indicators**: Visual feedback for connection and operation states\n- **Secure credential storage**: Passwords and keys encrypted by Node-RED\n\n## Installation\n\n### Via Node-RED Palette Manager\n\n1. Open Node-RED\n2. Go to Menu → Manage Palette → Install\n3. Search for `@digitalnodecom/node-red-contrib-best-sftp`\n4. Click Install\n\n### Via npm\n\n```bash\ncd ~/.node-red\nnpm install @digitalnodecom/node-red-contrib-best-sftp\n```\n\nThen restart Node-RED.\n\n## Nodes\n\n### sftp-config\n\nConfiguration node that stores SFTP server connection settings.\n\n| Property | Type | Description |\n|----------|------|-------------|\n| Host | string | SFTP server hostname or IP |\n| Port | number | SFTP port (default: 22) |\n| Username | string | Authentication username |\n| Password | string | Authentication password |\n| Keyboard Auth | boolean | Enable keyboard-interactive authentication |\n| Private Key | string | SSH private key (optional) |\n| Passphrase | string | Private key passphrase (optional) |\n\n### sftp-best\n\nMain SFTP operations node.\n\n| Property | Type | Description |\n|----------|------|-------------|\n| Server | sftp-config | Reference to server configuration |\n| Operation | string | SFTP operation to perform |\n| Remote Path | string | Path on the remote server |\n| Local Path | string | Local file path (for get/put operations) |\n| Recursive | boolean | Recursive mode for mkdir/rmdir |\n\n## Operations\n\n### list\nLists contents of a remote directory.\n\n**Input:** `msg.remotePath` or `msg.payload` (path string)\n**Output:** `msg.payload` - Array of file objects with `name`, `type`, `size`, `modifyTime`\n\n### get\nDownloads a file from the remote server.\n\n**Input:** `msg.remotePath` - Remote file path\n**Output:** `msg.payload` - File contents as Buffer, or `{success, localPath}` if local path specified\n\n### put\nUploads a file to the remote server.\n\n**Input:** `msg.payload` - Buffer with file contents, or use `msg.localPath` for local file\n**Output:** `msg.payload` - `{success: true, remotePath}`\n\n### delete\nDeletes a file on the remote server.\n\n**Input:** `msg.remotePath` - File to delete\n**Output:** `msg.payload` - `{success: true, deleted}`\n\n### mkdir\nCreates a directory on the remote server.\n\n**Input:** `msg.remotePath` - Directory path, `msg.recursive` - Create parent directories\n**Output:** `msg.payload` - `{success: true, created}`\n\n### rmdir\nRemoves a directory on the remote server.\n\n**Input:** `msg.remotePath` - Directory path, `msg.recursive` - Remove contents\n**Output:** `msg.payload` - `{success: true, removed}`\n\n### rename\nRenames or moves a file/directory.\n\n**Input:** `msg.remotePath` - Source path, `msg.newPath` - Destination path\n**Output:** `msg.payload` - `{success: true, from, to}`\n\n### exists\nChecks if a path exists on the remote server.\n\n**Input:** `msg.remotePath` - Path to check\n**Output:** `msg.payload` - `'d'` (directory), `'-'` (file), `'l'` (link), or `false`; `msg.exists` - boolean\n\n### stat\nGets file/directory information.\n\n**Input:** `msg.remotePath` - Path to stat\n**Output:** `msg.payload` - Stats object with `size`, `mode`, `accessTime`, `modifyTime`\n\n## Message Properties\n\nAll operations add metadata to the output message:\n\n```javascript\nmsg.sftp = {\n    operation: 'list',\n    remotePath: '/home/user/files',\n    host: 'sftp.example.com',\n    port: 22\n}\n```\n\n### Input Overrides\n\nYou can override node configuration via message properties:\n\n| Property | Description |\n|----------|-------------|\n| `msg.operation` | Override the operation type |\n| `msg.remotePath` | Override the remote path |\n| `msg.localPath` | Override the local path |\n| `msg.newPath` | Destination path for rename |\n| `msg.recursive` | Override recursive setting |\n| `msg.host` | Override server host |\n| `msg.port` | Override server port |\n| `msg.username` | Override username |\n\n## Examples\n\n### List Directory\n\n```javascript\nmsg.remotePath = '/home/user/documents';\nmsg.operation = 'list';\nreturn msg;\n```\n\n### Download File to Buffer\n\n```javascript\nmsg.remotePath = '/home/user/data.csv';\nmsg.operation = 'get';\nreturn msg;\n// Output: msg.payload contains file buffer\n```\n\n### Upload from Buffer\n\n```javascript\nmsg.payload = Buffer.from('Hello World');\nmsg.remotePath = '/home/user/hello.txt';\nmsg.operation = 'put';\nreturn msg;\n```\n\n### Check if File Exists\n\n```javascript\nmsg.remotePath = '/home/user/config.json';\nmsg.operation = 'exists';\nreturn msg;\n// Output: msg.exists = true/false\n```\n\n## Status Indicators\n\n| Status | Meaning |\n|--------|---------|\n| Yellow dot | Connecting to server |\n| Green dot | Connected / Operation complete |\n| Blue dot | Operation in progress |\n| Red ring | Error occurred |\n\n## Requirements\n\n- Node.js >= 18.0.0\n- Node-RED >= 2.0.0\n\n## License\n\nMIT\n\n## Contributing\n\nIssues and pull requests welcome at [GitHub](https://github.com/digitalnodecom/node-red-contrib-best-sftp).\n\n## Author\n\nTrajche <trajche@kralev.eu>\n","readmeFilename":"README.md"}