Steps to import Private Key (PPK) in SAP PI/PO for key based authentication
Introduction: This document describes that how to connect SAP PI/PO to any SFTP server, using private key authentication.
In this process, we will generate Private key and Public Key
Private key will be generated from Puttygen in PPK format, which we have to convert in P12 format because SAP PI/PO will only accept P12 Private key format.
Public Key will also be generated from Puttygen and it will be shared with SFTP partner,They will import this public key for an user of SFTP server.
In SAP PI/PO’s communication channel, we will user SFTP user and keystore with Key entry instead of password SFTP user.
Step by step process:
- Open Puttygen tool and click on generate to generate Private and Public key
- Save Private and Public key.
Enter passphrase and save private key as Private.ppk and public key as Public.pub.
Give Public.pub key to partner to import into SFTP server for a SFTP user which will be configured in SFTP communication channel of SAP PI/PO
Remember the passphrase to use in further steps and don’t change it for converted key as well so that it will be easy to remember
- Export open SSH file and save it with .pem file.
- Now we have PrivatePEM.pem file which has to be converted in to P12 file then only it can be imported into SAP PI or PO
- Download openssl (win32) from https://slproweb.com/products/Win32OpenSSL.html and Install on your system, if already installed then Generate x509 key pem key using openssl tool
Command ->openssl req -new -x509 -days 3650 -key PrivatePEM.pem -out x509_Private.pem
6. Now using x509 and pem key , generate p12 key
Command-> openssl pkcs12 -export -in x509_Private.pem -inkey PrivatePEM.pem -out PrivateP12.p12
Conclusion: This document explained how to you key based authentication in SAP PI/PO.