Hadidiz-AI

AI-powered SSH operations for remote server management

Overview

This node enables uploading files to a remote server via SSH. It supports two upload sources: binary data from previous nodes or direct text content input. The node connects to the remote server using either stored credentials or dynamic parameters, authenticating with a password or private key. Once connected, it uploads the specified file content to a designated directory and filename on the remote server.

Common scenarios include:

  • Automating deployment of configuration files or scripts to remote servers.
  • Transferring generated reports or logs from workflows to remote storage.
  • Integrating file uploads into broader automation pipelines requiring secure file transfer.

Example: Uploading a dynamically generated script (as text content) to /home/user/scripts on a remote Linux server for later execution.

Properties

Name Meaning
Connection Type Choose between using stored credentials or dynamic parameters for connection details.
Authentication Select authentication method: Password or Private Key.
Host Hostname or IP address of the SSH server (required if using dynamic parameters).
Port Port number of the SSH server (default 22, required if using dynamic parameters).
Username Username for SSH authentication (required if using dynamic parameters).
Password Password for SSH authentication (required if using password authentication).
Private Key Private key string for SSH authentication (required if using private key authentication).
Passphrase Passphrase for the private key, if applicable.
Upload From Source of the file content to upload: "Binary Data" or "Text Content".
Binary Input Field Name of the binary field containing data to upload (required if uploading from binary data).
File Content Text content to upload as a file (required if uploading from text content).
Remote Directory Directory path on the remote server where the file will be uploaded (required).
Remote Filename Filename to use on the remote server for the uploaded file (required).

Output

The node outputs a JSON object indicating the success status and details of the upload operation:

  • success: Boolean indicating if the upload succeeded.
  • operation: Always "uploadFile" for this operation.
  • remotePath: Full path on the remote server where the file was uploaded.

No binary output is produced by this operation.

Example output JSON:

{
  "success": true,
  "operation": "uploadFile",
  "remotePath": "/home/user/uploadedfile.txt"
}

Dependencies

  • Requires an SSH server accessible with provided connection details.
  • Supports authentication via password or private key.
  • Uses temporary local files during upload; requires filesystem access permissions.
  • No external API keys are needed beyond SSH credentials.
  • Node depends on the node-ssh library for SSH connections and file transfers.

Troubleshooting

  • SSH Connection Failed: Check host, port, username, and authentication credentials. Ensure network connectivity and that the SSH server accepts the chosen authentication method.
  • Invalid Remote Path: The remote directory path must be valid and writable by the user. Paths starting with ~ are expanded to the user's home directory.
  • Binary Data Issues: If uploading binary data, ensure the specified binary input field exists and contains valid binary data.
  • Permission Denied Errors: Verify that the SSH user has write permissions to the target remote directory.
  • Private Key Format: The private key must be correctly formatted. Passphrase must be provided if the key is encrypted.

Links and References

Discussion