This project has moved. For the latest updates, please go here.

SFTP ports other than port 22

Sep 29, 2008 at 1:50 PM
I'm working with a client that requires an SFTP connection using a port other than port 22 and a public/private key.
The adapter has been configured as follows:

UseLoadBalancing False
Trace False
Notify On Empty Batch False
Schedule Every 5 minutes
SSH Error Threshold 0
SSH host
SSH Identityfile Path to key-file
SSH Password Empty
SSH Port 7104
SSH User User Name

I have used the Tunnelier client and the troubleshooting application supplied in the adapter documentation, both which confirm that the connection details above are correct and will allow a connection to the SFTP site.

When the adapter is used by a receive location I get the following error (note it says it is connecting on port 22 - I suspect this is a red herring):

Method: Blogical.Shared.Adapters.Sftp.SftpReceiverEndpoint.EndpointTask
Error: Uri:s*.xml
Type: System.Exception
Message: Uri:s*.xml
Type: System.Runtime.InteropServices.COMException
Target: Void SubmitMessage(Microsoft.BizTalk.Message.Interop.IBaseMessage)
Message: Exception from HRESULT: 0xC0C0164B
 at Blogical.Shared.Adapters.Sftp.SftpReceiverEndpoint.PickupFilesAndSubmit()
 at Blogical.Shared.Adapters.Sftp.SftpReceiverEndpoint.EndPointTask()

I also get errors in the event logs indicating connection timeouts occuring which seem to suggest I cannot connect, hence I had tried the client & debug software to confirm the credentials being used.

Anyone willing to suggest a way of diagnosing exactly what is going on?

Nov 11, 2008 at 7:44 AM
Although the adapter has this as a configuration parameter the port number 22 is actually hard coded in a number of places in the underlying ssh library (SharpSsh). This might or might not change in future releases as we try to avoid changing the ssh library itself.
Nov 11, 2008 at 7:49 AM



Thank's for the reply. That seems to bear out what I am seeing.

Nov 11, 2008 at 12:33 PM

If you are in need of this functionality and would care to take the plunge and update I've uploaded a new version, to v1.3.1, that I think should solve your problem. I've marked it as beta because I've yet to fully test it, seeing how it includes an update of the SharpSSH library to a newer version that should really be done before marking it as stable, but I do believe that it will solve your problem. (So far I've only really tested that it works on port 22 and verified by way of searching through the files that it no longer features a hard-coded 22 anywhere). Please let us know if it will be of use and if it in fact solves your problem.
Dec 1, 2008 at 3:05 PM
Andy,  if you got time to test the new release, please rate it.