SFTP

The SFTP Node reads, writes, copies, moves, deletes, and inspects files on a remote server through SSH.

Revision History

0.0.0.22 - Published the file-operation contract.
0.0.0.1 - Initial release.
0.0.0.3 - Project restructure.
0.0.0.5 - SupportedCluster update.
0.0.0.10 - Node name correction.
0.0.0.23 - Updated the Node icon.
0.0.0.26 - Added certificate-based SSH authentication.
0.1.0.0 - Added SSH private-key file authentication.

Connection

The Connection stores the remote server address, timeout, and credentials used for SFTP access.

Property Type Description
Host String Host name or IP address of the remote server.
Port Integer Port to connect to. The default is 22.
Timeout (seconds) Integer Time to wait for the server before timing out.
Username String Username used to authenticate with the server.
Password Masked Account password, or the passphrase for an encrypted value in Client Private Key File Contents.
Client Private Key File Contents Masked SSH private-key file contents used for public-key authentication.
Certificate Certificate X.509 certificate containing an RSA or ECDSA private key used for SSH public-key authentication.

Setup Notes

Make sure the remote SFTP account can access the folders and files that the Workflow needs to use.

Choose one authentication configuration:

  • Enter Password for password authentication.
  • Enter the private-key text in Client Private Key File Contents. For an encrypted key, enter its passphrase in Password.
  • Select a Certificate containing an RSA or ECDSA private key. You can also enter Password when the server requires password authentication in addition to the certificate key.

Do not configure both Client Private Key File Contents and Certificate on the same Connection.

Remote paths are normalized to use forward slashes, so provide the server path exactly as the remote system expects it.

Methods

The SFTP Node exposes file operations against one remote SFTP server.

Read

Reads a file from the remote server and returns its content as a stream.

Parameter Type Description
Connection Connection SFTP Connection profile.
Path String Path of the remote file to read.
Return Type Description
Content Stream Stream containing the remote file content.

Write

Writes content to a file on the remote server and can replace an existing file when requested.

Parameter Type Description
Connection Connection SFTP Connection profile.
Path String Path of the remote file to write.
Content Stream Content stream to upload.
Overwrite Existing Boolean When true, an existing remote file is replaced.
Return Type Description
None None This method does not emit output values.

Copy

Copies a file to another location on the same remote server and can replace an existing destination file.

Parameter Type Description
Connection Connection SFTP Connection profile.
Path String Path of the remote file to copy.
Destination String Destination folder on the remote server.
Overwrite Existing Boolean When true, an existing destination file is replaced.
Return Type Description
None None This method does not emit output values.

Move

Moves a file to another location on the same remote server and can replace an existing destination file.

Parameter Type Description
Connection Connection SFTP Connection profile.
Path String Path of the remote file to move.
Destination String Destination folder on the remote server.
Overwrite Existing Boolean When true, an existing destination file is replaced.
Return Type Description
None None This method does not emit output values.

Delete

Deletes a file from the remote server.

Parameter Type Description
Connection Connection SFTP Connection profile.
Path String Path of the remote file to delete.
Return Type Description
None None This method does not emit output values.

Info

Retrieves metadata for a file stored on the remote server.

Parameter Type Description
Connection Connection SFTP Connection profile.
Path String Path of the remote file to inspect.
Return Type Description
Metadata Object Metadata for the selected remote file or folder.

Usage Notes

Use remote paths that are valid on the SFTP server and point Destination at an existing remote folder when you copy or move files.

Copy and Move operate within the same remote server exposed by the Connection, so use separate steps if you need to transfer files between different servers.