In this post, we will see how to configure a quick SFTP Server inside an Azure virtual machine and use it in any Azure Logic apps.
For one of our customer i was in charge of an integration process through SFTP. So, while developing the integration flow, i was in need of a SFTP Server for testing purpose. As the SFTP connection was not really my main challenge, i wanted something quick, free and easy to configure.
After googling “Free SFTP Server”, i randomly choosed Rebex tiny sftp server.
Guess how i’am lucky this time ! It’s a server built with .Net Framework. Plus it’s really easy to configure. Just unzip the downloaded package and if you are familiar with Microsoft technologies and Microsoft.Net Framework, you will quickly recognize the application configuration file. Open it and locate the “userName”, “userPassword” and “userRootDir” properties (I personnally haven’t played with other options as it was only for testing purpose). Specify the configuration properties you want to use (root directory is based under the unzipped folder location).
Once our SFTP server is configured we need to enable Port 22 (default SFTP port) to allow SFTP communications:
To enable port 22 on Azure portal, use the Networking tab under your virtual machine settings page.
From here, add an inbound and outbound port rule to enable your Azure virtual machine to be reached from port 22.
Well of course if your virtual machine is under a load balancer, you should:
Don’t forget to start the SFTP server by double clicking on the executable file you downloaded and press “Start button”. Now everything is up to test your logic app !
While you sets your SFTP connector in your Azure logic, make sure you have checked the Disable Host Key validation to skip validation step because we haven’t specified any key.