Hadidiz-AI

AI-powered SSH operations for remote server management

Overview

This node enables SSH operations on remote servers, specifically supporting executing commands, downloading files, and uploading files via SSH. The "Download File" operation allows users to securely retrieve a file from a remote server over SSH and output it as binary data within the workflow.

Common scenarios for this node include:

  • Automating retrieval of log files or reports from remote servers.
  • Integrating remote file contents into workflows for further processing.
  • Securely transferring files from servers without manual intervention.

For example, a user can specify the path of a configuration file on a remote Linux server and download it into n8n to parse or analyze its content automatically.

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 is 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.
Remote File Path Full path to the file on the remote server to download (required).
Binary Property Name Name of the binary property in which to store the downloaded file's data (default: "data").

Output

The node outputs an array with one item containing:

  • json object with metadata:

    • success: Boolean indicating if the download succeeded.
    • operation: String "downloadFile".
    • remotePath: The resolved full path of the downloaded file on the remote server.
    • fileName: The base name of the downloaded file.
  • binary object containing:

    • A property named as specified by the "Binary Property Name" input (default "data"), holding the binary content of the downloaded file.

This structure allows subsequent nodes to access the file content directly as binary data for further processing or storage.

Dependencies

  • Requires an SSH server accessible with provided credentials.
  • Supports two authentication methods: password or private key (with optional passphrase).
  • Uses an SSH client library internally to manage connections and file transfers.
  • Temporary local file storage is used during the download process before loading into binary data.

No additional external services or environment variables are needed beyond valid SSH credentials.

Troubleshooting

  • SSH Connection Failed: Errors connecting to the SSH server may occur due to incorrect host, port, username, or authentication details. Verify all connection parameters and credentials.
  • Invalid Remote Path: The node validates that paths starting with "/" are expanded to the home directory. Paths starting with "" alone (without slash) are rejected. Ensure the remote file path is correct and accessible.
  • Permission Denied: If the SSH user lacks read permissions for the specified file, the download will fail. Confirm file permissions on the remote server.
  • File Not Found: Ensure the remote file path exists and is spelled correctly.
  • Binary Property Name Conflicts: Avoid naming conflicts in the binary property to prevent overwriting existing data.

If the node is set to continue on failure, errors will be returned in the JSON output with success: false and an error message.

Links and References

Discussion