SAP Knowledge Base Article - Public

3476396 - SFTP Connections fails due error "reject hostkey"

Symptom

In SAP Datasphere, while establishing Generic SFTP Connection an error occurs:

Detailed error message reject hostkey: SFTP_name

Environment

 SAP Datasphere

Cause

Reject hostkey error means the generated hostkey was rejected by SFTP server.

Resolution

  1. Generate a hostkey in a supported format by following SAP Help Portal Prepare Connectivity for Generic SFTP

    • Windows 10: In PowerShell, run the following command:

      (ssh-keyscan -t rsa -p $PORT $HOST 2>$null) -replace '^[^ ]* ','' > host_key.pub.txt

    • Linux/MacOS: In a unix-compliant shell with both ssh-keyscan and sed commands (both are usually already installed in your system), obtain the key through the following command:

      ssh-keyscan -t rsa -p $PORT $HOST 2>/dev/null | sed "s/^[^ ]* //" > host_key.pub.txt

  2. Upload the Host Key again when creating the connection.

See Also

 KBA 3425821 Error "Code:1103002 " when connecting STFP into SAP Datasphere

Keywords

DS, timed out , KBA , DS-DI-CON , Connections , Known Error

Product

SAP Datasphere all versions