Docs
Sign in

SFTP

SFTP is a secure way to move files to and from a server. The SFTP connector lets TAO browse, read and search files on that server, and, with a person's approval, upload, rename, create folders and delete.

Screenshot to add: The Add SFTP server form with Host, Port, Username, Root directory and Authentication fields.

What you can do

Illustrative examples.

  • Ask Nexus to list the files in a bank's drop folder and tell you which arrived today.
  • Search a log file for the word "error" and show the matching lines.
  • Read the last 50 lines of a nightly export to check it finished.
  • Upload a report to a partner's server, after you approve it.
  • Use the SFTP workflow node to do the same steps inside a workflow. See App nodes.

Before you connect

You need:

  • The server host name and port (the usual port is 22, and the form fills it in).
  • A username.
  • Either a password, or a private key (a long secret text that proves who you are) and its passphrase if it has one.
  • A root directory. TAO can only see inside this folder. Choose the smallest folder that does the job.

Ask your server administrator for a login with the fewest rights possible. The form's own hint says the same: use a least-privilege login rooted in the smallest required directory.

Connect it

  1. Open Connectors

    Go to Settings > Connectors and find SFTP server. Click Add.

  2. Fill in the server details

    Enter Host, Port, Username and Root directory. All four are required.

  3. Choose how to sign in

    Under Authentication, pick password or private_key. Then fill in Password, or Private key and Key passphrase.

  4. Save and test

    Save the connection, then click Test connection. The result reads Connection works or Connection failed, with the checks it ran.

You can save more than one connection and give each a name. One is the default. Tools use the default unless a connection is named.

Tools

Tool nameWhat it doesRead or Write
sftp_list_connectionsLists your SFTP connectionsRead
sftp_list_directoryLists the entries in a folderRead
sftp_find_filesFinds files by name pattern, date or sizeRead
sftp_file_infoShows size, modified time and type of one fileRead
sftp_read_fileReads part of a text fileRead
sftp_tail_fileReads the last lines of a text fileRead
sftp_grep_fileSearches a text file for textRead
sftp_download_fileDownloads a file into the chat sessionRead
sftp_upload_fileUploads a fileWrite, waits for approval
sftp_renameRenames or moves a fileWrite, waits for approval
sftp_make_directoryCreates one folderWrite, waits for approval
sftp_delete_fileDeletes a file. You must give its exact nameWrite, waits for approval, cannot be undone
sftp_remove_directoryRemoves an empty folder. You must give its exact nameWrite, waits for approval, cannot be undone

Total: 13 tools. 8 read, 5 write.

Limits and good to know

  • Approval is always required for writes, even when a chat is set to skip approvals. The approval card shows the connection, server and exact path. It never shows your password or key.
  • Deletes are double checked. TAO compares the file again after you approve. If it changed in between, nothing is deleted.
  • Nothing is overwritten. Upload and rename refuse a name that already exists. There is no recursive delete.
  • Size limits. Reads return up to 48 KiB at a time. Downloads are limited to 25 MiB. Uploads are limited to 25 MiB from a file, or 256 KiB typed inline. Lists show up to 200 entries. Searching a file scans up to 64 MiB.
  • Text only. Binary files are refused. Reads default to UTF-8, with other encodings available.
  • Stays inside the root folder. Links that point outside it are refused, and TAO never follows a link when deleting.
  • Downloads need a chat. A workflow node cannot download a file.
  • Where approvals appear. Writes show up in Nexus under Approvals.
  • Administrators can pin the server's key or limit which addresses may be used. The code shows these as admin settings, not user settings.