BizTalk Server 2013: How to use SFTP Adapter
Introduction
BizTalk server has supported the FTP (File Transfer Protocol) adapter since its early release.
With the BizTalk 2010 release, Microsoft enhanced the existing FTP adapter to support SSL (FTPS), which encrypts the data transfers between systems. In the BizTalk 2013 release, Microsoft added SFTP (SSH File Transfer Protocol also, called Secure File Transfer Protocol). This has been much anticipated over the years and it is great that a true SFTP adapter now exists with BizTalk server. In the past for one had to rely on the open source adapter developed by Blogical found on CodePlex or an adapter from commercial third parties (like /n software SFTP). Now you will have advantages of Microsoft support for out-of-the-box of SFTP adapter.
For more information about BizTalk Server 2013 new features check this link
In this article I will demonstrate step by step of the followings:
- How to prepare a testing environment to communicate with the SFTP adapter as Figure 1?
- How to configure BizTalk SFTP Adapter?
- How to test BizTalk Adapter?
Figure 1. Demo Architecture
How to prepare a testing environment to communicate with the SFTP adapter?
- Create a new local user Control Panel -> Administrative Tools -> Computer Management -> Local Users and Groups -> right click User -> New User-> Specify a User name and password.
- Switch and Login for one time using SFTPUser to create user related folder and files.
- Download Windows SFTP server tool that allows you to connect, retrieve and put files to try out the functionality of the SFTP Adapter.There are many tools For this demo I am using the following one http://dl.bitvise.com/BvSshServer-Inst.exe ,Then install it with default settings and restart your machine and make sure that Bitvise SSH Server service is started.
- Download any SFTP client tool in this demo I am using the following tool http://winscp.net/download/winscp517setup.exe .Then install it with default settings and restart your machine.
- Open WinSCP and enter the Host Name , username and password as figure 2 then click the login button then click yes in the warning dialog .
Figure 2. WinSCP Login Dialog .
- Now you will see the following window as Figure 3.
**Figure 3. **WinSCP Start-up window
- Create a new Directory by selecting Files-> New -> Directory as figure 4.
**Figure 4.**Creating new Folder in WinSCP
- In create Folder window, enter folder name in this demo I named it MessageTesting and check Set permissions as figure 5.
- Write permissions is required by the BizTalk SFTP adapter.
**Figure 5.**Set Folder Permissions in WinSCP
- Create folder IN and OUT inside folder MessageTesting same settings of Step 7 and the path for receive location should be as figure 6.
**Figure 6.**Path of IN Folder in WinSCP
Now we are ready to configure the BizTalk SFTP Adapter.
How to configure BizTalk SFTP Adapter?
- Create a receive port I name it Rcv_SFTP then create receive location **Rcv_SftpLoc **then choose type of receive location to SFTP from drop down list, then click Configure then change AcceptAnySSHServerHostKey property to **True **then fill other settings as Figure 7.
](resources/5123.8.jpg)
**Figure 7.**Configuring Receive SFTP Adapter
- You can copy path of SFTP folder to clipboard as figure 8.
](resources/7444.7.jpg)
**Figure 8.**Copy Path to Clipboard in WinSCP
- Create Send port and Name Snd_SFTP select type from drop down list SFTP then click Configure then fill setting as Figure 9.
**Figure 9.**Send SFTP Adapter Configuration
- Configure Filter of send port subscribe messages from port Rcv_SFTP as figure 10.
Figure 10. Filter SFTP send port Configuration
- Enable receive location and Start send port.
How to test BizTalk Adapter?
- Copy any file to the IN folder path by drag drop from the left window panel to the right panel as Figure 11.
**Figure 11.**Copy dialog window in WinSCP
- Check OUT folder for generated file as Figure 12
**Figure 12.**Copy dialog window in WinSCP
Conclusion
In this demonstration, we investigated:
- The receive and send SFTP adapter, which is a new Feature comes with BizTalk Server 2013.
- The step by step of preparation of an environment for testing the transfer of messages using the SFTP adapter.
- And how to configure and test SFTP adapter.
See Also
Read suggested related topics:
- BizTalk Server 2013 R2 SFTP Adapter Tricks and Pitfalls
- What's New in BizTalk Server 2013
- SFTP Adapter Documentation****
- Bitvise SSH Server Installation Guide
- WinSCP Latest Release and Documentation
- Understanding Key Differences Between FTP, FTPS and SFTP
- BizTalk Server 2013: How to Configure SFTP Send Port Dynamically
- BizTalk Server 2013: Creating Custom Adapter Provider in ESB Toolkit SFTP As an Example
Another important place to find an extensive amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki.