The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
mithun_laha
1 year agoNew Contributor III
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...
- 1 year ago
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
Kamila
1 year agoContributor
Hi Mithun,
Sure, this is the part I use for authentication:
' Setup session options with private key authentication
Dim sessionOptions As New SessionOptions()
sessionOptions.Protocol = Protocol.Sftp
sessionOptions.HostName = "host.com" ' Replace with your hostname
sessionOptions.UserName = "myuser" ' Replace with your username
sessionOptions.SshPrivateKeyPath = $"File Share/XXXXX/New_Private_key_OS.ppk"
sessionOptions.SshHostKeyFingerprint = "YYYYYYY"
mithun_laha
1 year agoNew Contributor III
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
- Kamila1 year agoContributor
Hi Mithun,
The GetFileShareFolder helped, thank you so much for your help!
Kamila
- mithun_laha1 year agoNew Contributor III
You're welcome!
Related Content
- 3 months ago