Issues with Authentication

Advertisement

OuchMySpleen
Guest

Issues with Authentication

I've had powershell script running great for years, but the server I'm sending to recently change our credentials and now it is no longer working. Using the gui it works fine, but the script fails during login. Looking at the log it accepts the sshHostKey so that isn't it, which leads me to believe it may be the password as our new one has special characters that I may need to escape out or something. The password is something like c$1234Abc+t could the + be causing issues? I know that could be interpreted as a concatenate.

$sessionOptions = New-Object WinSCP.SessionOptions
    $sessionOptions.Protocol = [WinSCP.Protocol]::Sftp
    $sessionOptions.HostName = "sftp.ourclient.net"
    $sessionOptions.UserName = "myuser"
    $sessionOptions.Password = "c$1234Abc+t"
    $sessionOptions.SshHostKeyFingerprint = "ssh-rsa 2048 blahblahblah"

Reply with quote

Advertisement

You can post new topics in this forum