Skip to main content

Configuring the known_hosts file for SFTP (Linux w/ Docker)

When a Job uses the Send to FTP action over SFTP, the connection comes from the Informer containers, not the Linux host. So the SFTP server's fingerprint, stored in a known_hosts file on the host, must be mapped into the Informer containers. Because containers are recreated over time, each Informer container needs a volume mount to the host's known_hosts file for persistence.

Find the host's known_hosts​

Sign in to the Informer server as the maintenance user. From the host, connect to the target SFTP server once and accept the fingerprint so it is stored in known_hosts. Then find the known_hosts path for the logged-in user:

echo $(getent passwd $USER | cut -d: -f6)/.ssh/known_hosts

Note the resulting path; it becomes the host side of a new volume mount.

Add the volume mount​

  1. Stop all Informer components:

    docker-compose stop
  2. Delete the current Informer containers (default naming shown):

    docker-compose rm informer-api
    docker-compose rm informer-query
    docker-compose rm informer-schedules
  3. Edit docker-compose.yml and add this entry to the volumes section of every Informer service, using your host path on the left (this example is a known_hosts path from Ubuntu 20.04 for the user administrator; other distributions may differ):

    - /home/administrator/.ssh/known_hosts:/root/.ssh/known_hosts

    Each Informer container's volumes then looks like:

    volumes:
    - ./plugins:/informer/plugins
    - ./java/plugins:/informer/java/plugins
    - ./config.json:/informer/config.json
    - /home/administrator/.ssh/known_hosts:/root/.ssh/known_hosts

    Left of the colon is the host path to the user's known_hosts; right of the colon is where it must reside inside each container.

  4. Save and start all Informer components:

    docker-compose up -d

Once Informer is online, test the Send to FTP Job action to an SFTP server and confirm the export reaches its destination.