Please go through below links for details
SEEBURGER AG (www.seeburger.de) offers an SFTP/SCP adapter for SAP XI.
This adapter is fully integrated in the SAP XI adapter framework.
1. As far as I know XI file adapter does not support Secured File Transfer
2. In one of our projects we used Java proxies for handling files with SFTP from XI:
you can generate java proxy
then use a free or purchase (like Secure Ftp Factory http://www.scriptsearch.com/cgi-bin/jump.cgi?ID=9684 ) libraries to achive SFTP connections
3. the second option is the easiest & fastest one but you can also build an SFTP adapter youself
While the File/FTP adapter does not support secure FTP, there are a couple of options for protecting FTP communications.
1. Develop a custom FTPS adapter. There are some good commercially-available Java libraries that implement FTPS; I've found the Secure FTP Bean from Glub Tech (www.glub.com) to be reliable and compatible with many common FTPS servers. It's called a bean, but it really is just a basic Java API library. (It's shareware -- free to download for prototyping, $500 for internal use.)
You do need to understand the various options in the FTPS specification to get this to work. Reading IETF RFC 2228 will help.
2. Use the FTP adapter, and encrypt/decrypt the file contents through a user exit in the adapter. Something on the FTP server side will have to do the same.
About SFTP .
1) SFTP (Secure File Transfer Protocol)
"SSH File Transfer Protocol" or SFTP is a network protocol that provides file transfer and manipulation functionality over any reliable data stream. It is typically used with the SSH-2 protocol to provide secure file transfer. SFTP encrypts the session, preventing the casual detection of username, password or anything that is being transmitted. One key benefit to SFTP is its ability to handle multiple secure file transfers over a single encrypted pipe. By using a single encrypted pipe, there are fewer holes in the corporate firewall.
As per the latest SAP PI/XI support pack, it does not support SFTP via File Adapter.
So alternative approach to cater this requirement from XI is to make use of Unix Script at OS level to transfer the files from/to third-party systems.
Inbound Interface - i.e. third-party system ->XI->SAP:
File is transferred to a folder in SAP XI landscape from the third-party legacy system using UNIX Script with secured protocol. Once the file is ready in the XI landscape, File Adapter will poll this directory and file is picked up by NFS protocol.
Outbound Interface i.e. SAP->XI->third-party system:
XI is responsible for writing a file into a folder in the XI landscape. These files are transferred to the third-party system by executing UNIX scripts with secured protocol i.e. via sFTP.
Public key should be exchanged between external systems and the PI system.
UNIX shell script has to be developed and scheduled.
Ability to handle multiple secure file transfers over a single encrypted pipe .By using a single encrypted pipe, there are fewer holes in the corporate firewall.
Two-Step process i.e. XI
>Temporary folder>External System and vice-versa
Files have to be temporarily stored in XI server.
Multiple failure points i.e. XI and Unix script execution
Maintenance of an external UNIX script.
Difficulty in monitoring the execution of the shell script as it cannot be monitored thru XI.
Need to generate keys and install it in the SFTP site as a pre-requisite i.e. SFTP clients must install keys on the server.
SFTP uses keys rather than certificates. This means that it can't take advantage of the "chains of trust" paradigm facilitated through Certificate Authorities.
Files from the XI server should be deleted/archived in a periodic manner to increase the disc space so that it will increase the performance.
Note: UNIX shell Script can be executed as a background job or' can be triggered from SAP XI through OS command at File adapter level.
Check the links.
Reward points if Helpful
Just go through the below threads which has the same discussion.
I think as michal has suggested u can go for java libraries which does the same functionality.
Seeburger has the standard SFTP adapter if u hav the seeburger license then u do not need to require to create ur SFTP adapter.
For implementing this
1) u first need to buy a seeburger license from Seeburger.
2) Install the seeburger CD on XI.
3) u need to import the seeburger SWCV.
4) once u do all the configuration then only u will see the std adapter provided by seeburger in the adapter list.
5) if ur file is coming in EDi format then u need to use the BIC standalone tool for this. U need to deploy the mapping on Xi box which does the conversion of EDI-XML and XML to EDI.
Seeburger adapters like FTP,OFTPS,AS2,X400 are used for B2B scenarios where u hav a file coming over WAN or Mailbox and file formats are EDIFACT,TRADACOM etc.
the below information will work for you for steps for Seeburger adapter with SFTP
The SEEBURGER "VAN Access Adapter" for XI 3.0 which is mainy used for supporting various VAN access interfaces is also able to to scriptable secure FTP.
this Service Marketplace URL works for you:
(look for netweaver in detail / process integration / exchnage infrastructure in detail / connectivity / xi 3.0 / seeburger /)