Do you need a free SFTP server for script testing? Here is the solution.
One of the types of projects I frequently work on include Secure File Transfer Protocol(SFTP), a file protocol for transferring large files over the web, in a secure manner. As a developer, you may want to test connecting and uploading/downloading documents, without the involving other internal/external resources, i.e. other people. You just want to determine if your script “just works” before involving others in the process. An especially useful, free, tool will let you accomplish just that. Rebex Tiny SFTP Server provides you with an executable that will create a local SFTP server to test your scripts against. It can be found at the following link, https://www.rebex.net/tiny-sftp-server/#download. Unfortunately, it runs as a Windows EXE only.
Rebex also has other SFTP and security tools, for a cost, on their home site. I personally have not used them, but if you are so inclined, they have 30 day free trials for their products.
Downloading Tiny SFTP Server
Once you are on the site, you will be able to download a zip file containing the .exe file or you can download the application from GitHub.
Once you download the zip file, simply extract the contents to the directory of your choice. I have extracted the contents to a folder, on my desktop for this post.
Once you extract the files into your directory you will see four files. The license file, readme file, the application and the associated xml file.
Click on the RebexTinySFTPServer application file to start the application. The application window will appear. Click on the start button to start the SFTP server. This will create a local instance of the SFTP server on your device. Note the server address, port, username, and password in the application window. All the credentials you need to log into the SFTP server. It goes without mentioning, but I will say it again, this should used for testing purposes ONLY.
You now have a local instance of the SFTP server running. Once you have started the server, a “data” folder is created in the directory, where you placed the extracted files. You can place test files here for testing the scripts for downloading files.
It also creates a test file for you in the data folder.
You can then test your scripts against the server or connect with a file client like WinSCP.
I have used this little tool many times in testing my scripts for downloading and uploading files using SFTP, to determine if my script works as expected, before testing against live systems. I hope you find it useful as well.