SAP Knowledge Base Article - Preview

3111636 - Error "connection is closed by foreign host" occurs when connecting to an On-Premise sftp server via Cloud Connector


You are using the SAP Cloud Connector to securely connect SAP Cloud Integration tenant (former: CPI) to On-Premise SFTP server. You have followed resolution in SAP KBA 2643800 - CPI cannot connect to SuccessFactors SFTP server, but you still observe the below error when doing SSH Connection Test in SAP Cloud Integration > Overview > Test Connectivity.

com.jcraft.jsch.JSchException: connection is closed by foreign host

Images and data taken from SAP internal systems and demo environments. Any similarity to production data is purely coincidental.



  • SAP Integration Suite
  • SAP Cloud Integration


Cloud Integration 4.0 ; SAP Cloud Platform Integration for process services 3.0 ; SAP Integration Suite all versions


SAP Cloud Integration, SAP Integration Suite, SAP Cloud Platform Integration, Cloud Platform Integration, SAP CPI, CPI, SCPI, HANA Cloud Integration, HCI, SAP HCI, tenant, iFlow, Integration Flow, connection is closed by foreign host, com.jcraft.jsch.JSchException: connection is closed by foreign host, TCP SSL, TCP, On-Premise SFTP server, SAP Cloud Connector, TCP protocol , KBA , LOD-HCI-PI-CON-SOAP , SOAP Adapter , BC-MID-SCC , SAP Cloud Connector On-Demand/On-Premise Connectivity , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.