i use powershell to upload files to server. But it gives me error is: "Host key wasn't verified!".
however if I use the simple winscp script (with the host key), it works. anyone can help me to solve this problem?
here is powershell script:
# Load WinSCP .NET assembly # Use "winscp.dll" for the releases before the latest beta version. [Reflection.Assembly]::LoadFrom("\\c:\WinSCP\WinSCP.dll") | Out-Null # Setup session options $sessionOptions = New-Object WinSCP.SessionOptions $sessionOptions.Protocol = [WinSCP.Protocol]::SCP $sessionOptions.HostName = "myhost" $sessionOptions.UserName = "username" $sessionOptions.Password = "password" $sessionOptions.SshHostKeyFingerprint = "ssh-rsa 1023 xxxxxxxxxxxxxxxxxxxxxxxxxx" $session = New-Object WinSCP.Session