Can't connect to server using winscpnet.dll - winscp client works
Hi there,
I have spent several hours researching powershell examples for using winscp- I can connect to the server and transfer files with the winscp client, but I cannot get it to work with powershell- I keep getting the following error
Exception calling "Open" with "1" argument(s): "Connection has been unexpectedly closed. Server sent command exit status 0."
At C:\temp\ftptest.ps1:19 char:14
+ $session.Open <<<< ($sessionOptions)
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
I’ve tried it by directly trying to open a session within powershell (vs. using a script) and get the same error-
PS C:\Users\myself> $session.Open($sessionOptions)
Exception calling "Open" with "1" argument(s): "Connection has been unexpectedly closed. Server sent command exit status 0."
At line:1 char:14
+ $session.Open <<<< ($sessionOptions)
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
WinSCP version that shows when I click "help" is 5.5.6
I have spent several hours researching powershell examples for using winscp- I can connect to the server and transfer files with the winscp client, but I cannot get it to work with powershell- I keep getting the following error
Exception calling "Open" with "1" argument(s): "Connection has been unexpectedly closed. Server sent command exit status 0."
At C:\temp\ftptest.ps1:19 char:14
+ $session.Open <<<< ($sessionOptions)
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
I’ve tried it by directly trying to open a session within powershell (vs. using a script) and get the same error-
PS C:\Users\myself> $session.Open($sessionOptions)
Exception calling "Open" with "1" argument(s): "Connection has been unexpectedly closed. Server sent command exit status 0."
At line:1 char:14
+ $session.Open <<<< ($sessionOptions)
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
WinSCP version that shows when I click "help" is 5.5.6