Put a file with SFTP
Description
The Put a file with SFTP
action pushes one or more files to an SFTP server using the Secure FTP protocol.
The action returns true if the specified file(s) or pattern were uploaded successfully, false it there were problems uploading the file(s).
If you run into a Algorithm Negotiation Fail error when connecting to your SFTP server, check the Algorithm Negotiation Fail Error section at the end of this page. |
Options
General Tab
Option | Description |
---|---|
Workflow action name | The name of the workflow action. Note: This name has to be unique in a single workflow. A workflow action can be placed several times on the canvas, however it will be the same workflow action. |
SFTP-server name (IP) | The name of the SFTP server or the IP address. |
SFTP port | The TCP port to use. This is usually 22. |
User name | The user name to log into the SFTP server. |
Password | The password to log into the SFTP server. |
Use private keyfile | Indicates whether or not a private keyfile is to be used. |
Private key filename | If |
Key passphrase | If |
Proxy type | The proxy type (SOCKS5, HTTP) of the specified proxy server. |
Proxy host | The host name or the IP address of the proxy server. |
Proxy port | The port of the proxy server to connect to. |
Proxy username | The username to log into the proxy server as. |
Proxy password | The password associated with |
Compression | The compression to use in the file transfer. Current options are
|
Files tab
Option | Description |
---|---|
Source (local) files | |
Copy previous results to args | If the name of the files to send are dynamically generated as a result by another pipeline, check this option. Hop will select the files list from previous result rows (not result files, see next option) and send these files. Only the first field in the results will be used to identify the files to send: if a file cannot be found, Hop will ignore it. |
Copy previous result files to args | If the files to send are dynamically generated by another pipeline or workflow action, check this option. Hop will select the files list from previous result files stream and send these files. If a file cannot be found, Hop will ignore it. |
Local directory | The directory on the machine on which Hop runs where the files to upload reside |
Wildcard (regular expression) | Specify a regular expression here if you want to select multiple files. This option is disabled if either one of Examples of regular expressions: |
Success when no file | Check this option if the workflow action has to succeed when there are no files to process, otherwise the workflow will fail. |
After SFTP Put | Action to take after the file is transferred. The available options are:
|
Destination folder | Enabled if the |
Create destination folder | Enabled if |
Add filename to to result | Enabled if |
Target (remote) folder | |
Remote directory | The remote directory on the SFTP server in which the files will be uploaded. Use the |
Create folder | Check this option if the destination folder does not exist and should be created. |
Algorithm Negotiation Fail Error
If your Put a file with SFTP
action returns an error message like the one below, you (or the server you are connecting to) are probably using key types that are considered unsafe in the dependencies used by this action in recent Apache Hop versions.
com.jcraft.jsch.JSchhAlgoNegoFailException: Algorithm negotiation fail…
The better and more secure option is to upgrade your keys to more secure types. However, you can still connect to this SFTP server by adding the options below to the HOP_OPTIONS
variable in your startup command (in hop-gui.sh/bat
or hop-run.sh/bat
, or in your HOP_OPTIONS
environment variable):
-Djsch.client_pubkey=ssh-rsa,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256 -Djsch.server_host_key=ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa