Forum Discussion

mithun_laha's avatar
mithun_laha
New Contributor III
5 months ago
Solved

SFTP Connection with PPK file

Hi Everyone,

Has anyone worked on establishing an SFTP connection in extensibility rules using a PPK file? I am currently facing an issue where, despite setting the SshPrivateKeyPath property in the session options, I receive the error: "No supported authentication methods available (server sent: publickey)."

Any insights or solutions would be greatly appreciated.

Thank you,

Mithun

  • Hi Kamila,

    Could you please try the following in the SshPrivateKeyPath:

    sessionOptions.SshPrivateKeyPath = $"{BRApi.Utilities.GetFileShareFolder(si, FileShareFolderTypes.ApplicationRoot, Nothing)}\AppName\ppk_file.ppk"


    If the above does not work, could you also try adding the port number in the sessionOptions? 

    Best regards,
    Mithun

  • Hi Mithun,

    I have the same issue now, did you manage to solve it? Thanks!

    • mithun_laha's avatar
      mithun_laha
      New Contributor III

      Hi Kamila,

      I hope this message finds you well.

      Please follow the steps below to set up the SFTP connection:

      1. Save the .ppk file into the fileshare folder.
      2. Use the .ppk file in the sessionOptions variable (SshPrivateKeyPath) 

      If you have any questions or need further assistance, please don't hesitate to reach out.

      Thank you,
      Mithun

      • Kamila's avatar
        Kamila
        Contributor

        Thanks Mithun, I already did that and still have the error:

        Any ideas? Thanks!