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

PassPhase is required

Oct 22, 2008 at 4:21 PM
How do i configure the SFTP Adapter if i need to provide a passphase to authenticate to the SFTP site?

Please let me know.
-Wayne
Coordinator
Oct 22, 2008 at 8:28 PM
We currently don't supprt passphase :-(.
Oct 25, 2008 at 11:51 PM
Are they any talks about supporting passphase? Will this be part of an enhancement duing the next release? Just inquiring...
Coordinator
Oct 26, 2008 at 5:57 PM
I don't mind implementing it, as long as it's supported by the SharpSSH library. However, I find it differcult to find the time right now. If you are in a hurry you could check out if it is suported, and get back to me. I could then implement it.

Have a look at http://www.tamirgal.com/home/dev.aspx?Item=SharpSsh

hth

//Mikael

Nov 12, 2008 at 8:16 AM
Hi,

I'm also in need for this functionality. From what I can see, the SharpSSH library supports this. Wouldn't it be sufficient to implement the usage of the method AddIdentityFile(string privateKeyFile, string passphrase) of the SshBase class? Of course this change requires a new overloaded constructor of the Sftp class and the added support for this parameter in the adapter properties.

Would this be a feasible change?

//Jan
Coordinator
Nov 12, 2008 at 2:08 PM
Cool. Thanks for the research Jan. If you can volunteer to test it (we will of course do initial tests), I'll go as far as promise this addition through a development release by the end of this week (which might or might not mean that it will be done during the weekend). We'll add the passphrase functionality and expose it as an optional property in the adapter.
Nov 13, 2008 at 7:18 AM
Yes, I can help out on testing this feature. I have made what I think would be the required changes to the source code I downloaded and have started running some tests using a 3DES CDC keyfile with a pass phrase. So far I struggling with decryption exceptions, but the extension of a identityFilePassword property seems to work fine.
Coordinator
Nov 14, 2008 at 7:52 PM
Great, let us know if there anything we can help you with. You can reach us through mail or im at our blogs.
http://blogical.se/blogs/johan/
http://blogical.se/blogs/mikael/

//Mikael
Nov 16, 2008 at 10:33 PM
Sure thing.

I seem to be struggling with some limitations in SharpSSH during my tests, but have to confirm whether this has been solved in 1.1.1.3.

Would be nice if you guys could provide me with a development release with the new property added, as my test environment is becoming a bit unstable :)
Nov 17, 2008 at 12:42 PM
Hi,

Just wanted to let you guys know that using the 1.3.1 version of the adapter solved my decryption problems. Judging from the change log of SharpSSH this was fixed in 1.1.1.3.

Would be nice to see a new beta version of the adapter with the identityFilePassword added to the collection of properties sometime this week :)

Thanks in advance, appreciate your effort guys.
Coordinator
Nov 17, 2008 at 1:41 PM
Edited Nov 17, 2008 at 2:00 PM
Oh, I didn't mean to not do what I said I would. However I interpreted your response such that I thought you were doing the development on your own, so I didn't look into the matter further.
Did you have any adapter code that you have altered to support this fearure that we can use as a base for the change? And what have you and haven't you done?
Coordinator
Nov 23, 2008 at 9:49 PM
I've uploaded a beta release for this. Feel free to try it out and report back any issues you might run into. See http://www.codeplex.com/SftpAdapter/Release/ProjectReleases.aspx?ReleaseId=19784.
Nov 24, 2008 at 10:42 AM
Thanks a lot guys! I'll give it a spin.
Nov 25, 2008 at 8:11 AM
Just wanted to let you guys know, it's looking good so far. I've run a few test using a 3DEC CDC keyfile and everything works as expected. I will be doing some more intensive testing in the weeks coming up.

Also, there's a typo in the adapter properties (ReceiveLocation.xsd & TransmitLocation.xsd) where SSH Identity Passphrase reads SSH Idetityfile Passphrase.
Coordinator
Dec 1, 2008 at 4:03 PM
Wayne and Jan,  If you got time to test the new release, please rate the release.
//Mikael
Dec 18, 2008 at 8:40 PM
Hey Guy,

Sorry for the late reply...I will test this release this week. Thanks everyone for your input. I will get back to you.

-Wayne
Dec 19, 2008 at 3:57 AM
I'm unable to connect to the SFTP site using the SFTP adapter. I supplied the following SSH Host(FTP SITES IP ADDRESS), SSH IdentityFile, SSH IdetityFile PassPhase, SSH UserName and i continue to get a Unable to login error message. 

I tried the same process using WINSCP SFTP Client and i'm able to connect and transfer files via SFTP.

Below is the error message. Any Hint and what i should look for?

Please let me know.

Thank you,
-Wayne Magnum

Method: Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect
Error: Unable to connect to Sftp host [129.41.62.246]

------------------------------
Information:
Type: Blogical.Shared.Adapters.Sftp.SftpException
Target: Microsoft.BizTalk.Message.Interop.IBaseMessage ProcessMessageInternal(Microsoft.BizTalk.Message.Interop.IBaseMessage, Blogical.Shared.Adapters.Sftp.ISftp)
Message: Unable to transmit file /e7b7f034-52e9-4e4c-ab8f-e129f5ea1c54.
Inner Exception:
Unable write file to /e7b7f034-52e9-4e4c-ab8f-e129f5ea1c54
Unable to connect to Sftp host [129.41.62.246]
Stacktrace:
   at Blogical.Shared.Adapters.Sftp.SftpTransmitterEndpoint.ProcessMessageInternal(IBaseMessage message, ISftp sftp)
   at Blogical.Shared.Adapters.Sftp.SftpTransmitterEndpoint.ProcessMessage(IBaseMessage message)

------------------------------
Type: Blogical.Shared.Adapters.Sftp.SftpException
Target: Void Put(System.IO.Stream, System.String)
Message: Unable write file to /e7b7f034-52e9-4e4c-ab8f-e129f5ea1c54
Stacktrace:
   at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.Put(Stream memStream, String destination)
   at Blogical.Shared.Adapters.Sftp.SftpTransmitterEndpoint.ProcessMessageInternal(IBaseMessage message, ISftp sftp)

------------------------------
Type: System.Exception
Target: Void connect(Boolean)
Message: Unable to connect to Sftp host [129.41.62.246]
Stacktrace:
   at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect(Boolean force)
   at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.reConnect()
   at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.Put(Stream memStream, String destination)

------------------------------
Type: Tamir.SharpSsh.jsch.JSchException
Target: Void .ctor(System.String, Tamir.SharpSsh.jsch.JSch)
Message: invaid privatekey: C:\SFTP\BillFileUpload.ppk
Stacktrace:
   at Tamir.SharpSsh.jsch.IdentityFile..ctor(String identity, JSch jsch)
   at Tamir.SharpSsh.SshBase.AddIdentityFile(String privateKeyFile, String passphrase)
   at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect(Boolean force)

Coordinator
Dec 19, 2008 at 11:39 AM
I can't give you much more info than the exception message does, that is: "Invalid private key". Perhaps the key file is not of a type supported by the SFTP Adapter? That is, it's not supported by SharpSSH (http://www.tamirgal.com/home/dev.aspx?Item=SharpSsh#features)
Dec 19, 2008 at 2:08 PM
Thanks Jeh...I reviewed the features supported by SharepSSH and the issue with me is the encryption type that i'm using which is not currently supported. I'm using "aes256-cbc" and SharepSSH only supports "3des-cbc" and , "aes128-cbc". BUMMER :(

Thanks anagin for your help.

-Wayne Magnum