SFTP Adapter authentication for BizTalk

There is a nice little SFTP adapter for BizTalk on CodePlex http://www.codeplex.com/SftpAdapter/. I have been trying this out for a couple of days and it works quite nicely. I have been using freeSSHd as SFTP server and WinScp as a client to see that the SFTP functionality works. WinScp comes with PuttyGen for generating key pairs for authentication and there are a couple of guides on the web which offer clues as to how this should all be configured but I still had to resort to trial and error to get the SFTP authentication working. So this is my super concise guide to getting it up and running for local testing (presuming you have installed all the software first).

Generate a keypair with PuTTYGen

Under WinScp in the start menu you have “Key Tools/PuTTYGen”

Click “Generate” and move the mouse about. When PuTTYGen has created your keypair enter a comment so that you key is easier to identify, you can use a passphrase for your master key if you like. Save your private key as a .ppk file somewhere safe this is your master file and you can open it in PuTTYGen later if you need to export it again. Export the key (under the Conversions menu) as an OpenSSH key, but remove the passphrase first since the SFTP adapter doesn’t currently support passphrases for private keys, save this key somewhere where the SFTP adapter can access it. This key should also be kept safe since it is the equivalent of a password. Select the entire textbox with the public key and copy to the clipboard.

Configure freeSSHd for public key authentication

Open up the freeSSHd settings dialogue and go to Authentication. Enter a directory where the public keys for your users will be stored. Make sure that “Public Key Authentication” is not set to disabled and that “Password Authentication” isn’t required.

You also need to set a directory under the SFTP tab for storing the files. Add users in the Users tab selecting “Public key (SSH only)” as the authorization method. Also make sure that the SFTP checkbox is selected.

Go to the directory that has been configured for freeSSHd keys. Create a text file named “username” ( the users login name and no extension) and paste the public key string from PuTTYGen into it making sure it is all on one line.

Test it with WinScp before trying it from BizTalk. Now you should be up and running with your SFTP adapter and an SFTP server.

2 Responses to “SFTP Adapter authentication for BizTalk”

Read below or add a comment...

  1. Raja Kumaravel says:

    Thank you very much for good introduction.

Leave A Comment...

*