In this blog post I will explain each step required to configure FTP and SFTP adapter in CPI using basic authentication.
The FTP adapter allows you to configure transport protocol FTP/FTPS for the connection to the FTP server to send messages to the FTP server or to receive messages from the FTP server. FTP adapter uses TCP protocol to connect to CPI tenant to remote system to send/receive files.
The SFTP Adapter connects an SAP Cloud Integration tenant to a remote system using the SSH File Transfer protocol to write files to the system. The SFTP adapter uses a certificate and keystore to authenticate the file transfer unlike the standard FTP. The SFTP adapter achieves secure transfer by encrypting sensitive information before transmitting it on the network. It uses SSH protocol to transfer files.
We have requirements mostly in Financial workstream to poll the files from bank server and post the files to SAP system without changing the content of file. File format can be any XML, TXT, CSV, BAI, BAI2 etc.
Message flow will be like this:
Steps required to configure this Integration Flow in CPI:
Step1: To connect to FTP server we should have FTP server url/IP address, port, user id and password details. To connect to FTP server, we should a establish TCP connection in Cloud connector first.
You need to login to cloud connector and go to Cloud to On Premise and add Mapping virtual to Internal system.
Here we need to maintain 2 connections. One is FTP control connection with port 21 and other one is FTP data connection with port data port range.
Step 2: Deploy FTP credentials to Security material of CPI.
Step 3: Create TCP connection for SFTP server same as FTP:
Step 4: Update SFTP Known_host file in CPI security material. If it is not available, then we can create this file and deploy in CPI.
Now how to get this known_host details (public key) of SFTP?
Option 1: get it from SFTP server admin.
Option 2: We can generate it ourselves using connection test in CPI tenant.