MuleSoft · SFTP Connector

SFTP:KEY_EXCHANGE_FAILED

Short answer

SFTP:KEY_EXCHANGE_FAILED means the app started an SSH connection to the server and failed at the key exchange step. Compare the algorithms the server requires with what the connector offers, using the server configuration and SSH trace logging.

VerifiedLast verified

01Error text

MuleSoft error
Error type: SFTP:KEY_EXCHANGE_FAILED

02Likely causes

  • The app tried to make an SSH connection to the server, but failed in the key exchange step.
  • The server may require a specific encrypted channel, such as particular ciphers, key exchange algorithms or authentication keys.

03How to fix it

  1. Review the server configuration for the algorithms it accepts. For OpenSSH, that is sshd_config.
  2. In log4j2.xml add <AsyncLogger name="org.apache.sshd" level="TRACE"/> and read the negotiation in the log. Remove the logger afterward because it degrades performance.
  3. Raise the logging level on the SFTP server and read its log for the same attempt.
  4. Handle the failure with an error handler of type SFTP:KEY_EXCHANGE_FAILED.

04Official documentation

Test every fix in a non-production environment before you apply it to production. See how entries are verified.

More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.