Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Gérard

Fixed

Hi,

For this particular error, "permission denied", unfortunately I didn't find any log in log file.
After some investigations I realized that I have to assign following parameters values in sessionOptions, they were not provided in the example I used:
sessionOptions.PortNumber
and sessionOptions.SshPrivateKeyPath when using an ssh key file
or sessionOptions.Password when using password directly

All works now.
Thank you!
Best regards
Gérard
martin

Re: Network error: Permission denied when open a session.

Can you connect from the same machine using WinSCP GUI or any other SFTP client?
If you can, post its log file and equivalent log file from the .NET assembly.
Gérard

Network error: Permission denied when open a session.

Hi all,

I'm using provided example: https://winscp.net/eng/docs/library_session_getfiles#example
Code is compiled with .NET 4.8.1, and WinSCPnet.dll version 6.3.2.0.
Executed on a Windows Server 2022.

In SessionOptions I can use either password (ie: Password = "mypassword") or a private key (ie: SshPrivateKeyPath = "C:\\Temp\\mytestkey.ppk").

When try to connect and call session.Open(sessionOptions); I get this error:
Network error: Permission denied

Any idea what's the issue?

Thank you in advanced!

Best regards
Gérard