Register Login

Connecting SFTP Server from SAP HCI (HANA Cloud Integration)

Updated May 18, 2018

How to connect SFTP Server from HCI

Exchanging files is a very common scenario. You may have files to exchange that contain your HR data or your finance data and so and so forth or there may be legacy systems which can accept only files.In any case exchanging files becomes a very important activity.

How SFTP Works

In the HCI (HANA Cloud Integration) world, when we connect to an SFTP server, HCI acts as the client. HCI never acts as the server whether it is pulling data from an SFTP server or pushing data to an SFTP server. In both cases, HCI works as the client and you have the server.

This tutorial explains how to reset up an SFTP connection to HCI. As described above, HCI is the client and then you have a server location or the folder location there you would push data to.

Important Artifacts In SFTP

Private, public key of your HANA Cloud Integration. Now, remember this is your client key. Similarly, SFTP server would be recognized by private, public key pair for different certifying authority maybe but never the less this is the first set of artifacts that are required to be made available.

On the HCI system you have key store and the known hosts file which participate in the SFTP process. Similarly in the SFTP server side you have usually something called as the authorised keys. Now the keystore is something which stores your private public key pair and your known host file will be same as a new says known host which are the SFTP server that the HCI system can recognize. Similarly like the known hosts file on HCI side, all SFTP servers would have something called as the authorized keys which recognizes which all clients can made be recognized. So it’s important for you to have this information in these systems. For example a known host file contains the name of the SFTP server, the public key algorithm used by the server and the public key of the server.

Now this is absolutely essential to be made available in HCI else whenever HCI initiates a connection and gets a response back from the SFTP server, it would check in the known hosts file cannot recognize the server. If these entries are not there then HCI will terminate the connection.

How a known hosts file looks.

If you open the known hosts file in a text editor for example, a notepad the server to which you connecting to such as integration.hana.ondemand.com. This is the location of the host file of the SFTP server to which I would like to connect. Second is the algorithm of the server. So if you use an ssh-rsa algorithm followed by the public key of the SFTP server.

So, on the HCI side you should ensure that the known_host file of the connected server is there and then your particular public key must be provided to the admin so that they can update the authorized keys list. That is it. With these connections in place, HCI can communicate to your SFTP server.

Now navigate to the monitoring page, you have see your keystore on system.jks file and you have your known_hosts maintained – SSH known hosts.

All that you have to do after you set up the known_hosts file and the keystores is to configure the settings in the SFTP sender and receiver channel.

For example, here we have configured the receiver channel, specified the directory, file name that it should be addressed for it to connect to the user name

.

You can also specify other properties for what should be done for processing the file or any other advanced settings. Similarly, you can specify an SFTP and a sender side where you can provide details like which directory it was picked up, which are the file it must pick up, the address, Username to connect to that particular file server and so on. You can also schedule the intervals at which the file must be picked up.

So, that is it and that is how you connect to an SFTP server from HCI.


×