Topic "Connection has been unexpectedly closed. Server sent command exit status 0."

Author Message


I'm using winscpnet.dll to connect to BitViseSSH Server in a powershell script

In the script I'm attempting to use a .xml file to make a config file of sorts. I was getting the above error and looked through the suggestions on this link, none of which were helpful in my situation.

As it turns out the issue I was having is I'm using an SSH key for authentication and this error was basically saying it couldn't find the private key I was using for authentication. The login succeeded but the Key authentication failed because it couldn't find the key in the path I specified.

Just thought I'd put this somewhere so other people with the same error can find it as a possible solution


You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License