Using SFTP: Secure File Transfer Protocol

Overview

This manual is divided into several sections, each focusing on a specific aspect of using SFTP in Kognitos.

Introduction

The integration of SFTP with Kognitos offers a seamless and efficient way to manage file transfers between your local system and remote servers. This integration enables users to perform a wide range of operations on SFTP servers, including connecting to servers, uploading files, and downloading files, all through the use of Kognitos’ natural language processing capabilities. This section provides an overview of the SFTP-Kognitos integration and outlines the prerequisites for using SFTP on Kognitos.

Prerequisites for Using Kognitos with SFTP

Before you can start using Kognitos to interact with SFTP servers, there are several prerequisites that need to be met:

  1. SFTP Server Access: You need to have access to an SFTP server. This includes having the hostname, port, username, and password for the server.
  2. Network Configuration: Ensure that your network allows connections to the SFTP server. This may involve configuring firewalls or proxy settings.
  3. Basic Understanding of SFTP: While Kognitos simplifies interactions, having a basic understanding of SFTP operations (e.g., file paths, permissions) will help you automate more effectively with Kognitos.

Once these prerequisites are met, you are ready to start leveraging the power of Kognitos to enhance your SFTP experience, making it more accessible, efficient, and customizable.


Setting Up SFTP Connection

Connecting to an SFTP Server

To interact with an SFTP server using Kognitos, establishing a secure connection to your SFTP instance is the first critical step. This section outlines the credentials required for this connection and provides a detailed, step-by-step guide to connect successfully.

Required Credentials

To connect to an SFTP server, you will need the following credentials:

  1. SFTP Hostname: The hostname or IP address of your SFTP server.
  2. SFTP Port: The port number for your SFTP server (default is 22).
  3. SFTP Username: The username associated with your SFTP account.
  4. SFTP Password: The password for your SFTP account.

Step-by-Step Connection Process

  1. Gather Credentials: Ensure you have all the required credentials: SFTP hostname, port, username, and password.

  2. Connect to SFTP Server: To initiate a connection to the SFTP server, use the following Kognitos command:

    connect to sftp with
        the sftp hostname is "<SFTP_Hostname>"
        the sftp port is <SFTP_Port>
        the sftp username is "<Your_Username>"
        the sftp password is "<Your_Password>"
    

    Replace <SFTP_Hostname>, <SFTP_Port>, <Your_Username>, and <Your_Password> with your actual SFTP hostname, port, username, and password, respectively.

    connect to sftp with
        the sftp hostname is "example.com"
        the sftp port is 22
        the sftp username is "user"
        the sftp password is "password"
    
  3. Verify Connection: After executing the above command, Kognitos will attempt to establish a connection to the SFTP server using the provided credentials. If the connection is successful, you can proceed with further operations like uploading or downloading files. If the connection fails, verify your credentials and ensure that your SFTP hostname, port, username, and password are correct.

  4. Connection Established: Once the connection is successfully established, you are ready to perform various operations on the SFTP server. You can now upload files, download files, and manage files on the server.

You need only perform the connection one time. Once the connection is establish you can directly perform the below functions in Kognitos with SFTP.


Uploading Files to an SFTP Server

Uploading files to an SFTP server is a common task when integrating SFTP with Kognitos. This section covers how to upload files to an SFTP server, including specifying remote paths.

Basic Upload

To upload a file to an SFTP server, use the following Kognitos command:

connect to sftp with
    the host is "sftp.example.com"
    the username is "user"
    the password is "password"
get the file
dump the file to sftp

Upload with Specified Remote Path

To upload a file to a specific path on the SFTP server, use the following Kognitos command:

connect to sftp with
    the host is "sftp.example.com"
    the username is "user"
    the password is "password"
get the file
the remote path is "/uploads/myfile.txt"
dump the file to sftp

In this example, the file is uploaded to the specified remote path on the SFTP server.


Downloading Files from an SFTP Server

Downloading files from an SFTP server is another essential task when integrating SFTP with Kognitos. This section covers how to download files from an SFTP server.

Downloading a File

To download a file from an SFTP server, use the following Kognitos command:

connect to sftp with
    the host is "sftp.example.com"
    the port is 22
    the username is "user"
    the password is "password"
get a file from sftp with
    the remote path is "/path/to/remote/file.txt"

In this example, the file located at the specified remote path on the SFTP server is downloaded.


Glossary of Terms

  • SFTP (Secure File Transfer Protocol): A network protocol that provides file access, file transfer, and file management functionalities over a secure connection.
  • Hostname: The name or IP address of a server where the SFTP service is hosted.
  • Port: A communication endpoint. The default port for SFTP is 22.
  • Username: The identifier used to log into the SFTP server.
  • Password: The secret word or phrase used to authenticate the username on the SFTP server.
  • Remote Path: The directory path on the SFTP server where files are stored or retrieved from.

By following these guidelines, you can effectively manage file transfers with SFTP in Kognitos, from connecting to servers and uploading files to downloading files as needed.