locked
SFTP connection Diffie Hellman error RRS feed

  • Question

  • This question has been asked already on the web, but the answer did not work for me. 

    This is for an Azure batch application that uses Tamir.SharpSsh.

    Calling Sftp.connect() causes the error:

    Tamir.SharpSsh.jsch.JSchException: Session connect: System.IO.FileNotFoundException: Could not load file or assembly 'DiffieHellman, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

    After installing DiffieHellman and Org.Mentalis.Security, the error does not go away.

    Other sources suggest strong naming the assemblies, which I have tried without success.

    Is there some other method to mitigate this error?

    Thanks in advance.

    Thursday, July 20, 2017 3:07 PM

Answers

  • Hi Hackathor,

    I believe Ivan's answer to your previous question applies here:

    https://social.msdn.microsoft.com/Forums/azure/en-US/d71224ed-377e-4dbb-a6d2-4aa683f692e3/migrating-libraries-to-azure-batch-file-not-found?forum=azurebatch

    You need to make sure that all of the dependent DLLs are in the same folder on the Batch node. I suspect that they are not (given your previous question). Can you share specific details about your directory layout and command line being run? Can you RDP into the node and diagnose the application assembly load errors from inside the node?

    Your error has nothing to do with Diffie-Hellman, it's purely a C# assembly resolving/load issue.

    • Marked as answer by Hackathor Tuesday, August 1, 2017 5:05 PM
    Thursday, July 20, 2017 4:44 PM

All replies

  • Hi Hackathor,

    I believe Ivan's answer to your previous question applies here:

    https://social.msdn.microsoft.com/Forums/azure/en-US/d71224ed-377e-4dbb-a6d2-4aa683f692e3/migrating-libraries-to-azure-batch-file-not-found?forum=azurebatch

    You need to make sure that all of the dependent DLLs are in the same folder on the Batch node. I suspect that they are not (given your previous question). Can you share specific details about your directory layout and command line being run? Can you RDP into the node and diagnose the application assembly load errors from inside the node?

    Your error has nothing to do with Diffie-Hellman, it's purely a C# assembly resolving/load issue.

    • Marked as answer by Hackathor Tuesday, August 1, 2017 5:05 PM
    Thursday, July 20, 2017 4:44 PM
  • I did have a misconception at first about uploading an application package for each library. But now I have the entire project uploaded as an application package. This is the command line I used:

    "cmd /c %AZ_BATCH_APP_PACKAGE_MYAPPLICATION%\\myApplication\\bin\\Debug\\myApplication.exe"

    The DLLs are in the same directory as the exe file and yet it says the package cannot be found.


    • Edited by Hackathor Friday, July 21, 2017 6:31 PM
    Friday, July 21, 2017 6:26 PM