Post a reply

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

honey_cutt

i believe i found the problem. in powershell you have to escape the '$' with a backtick. if you don't powershell looks at it as a variable within the double qoutes. hope this helps some one else in the future.

honey_cutt wrote:

@prikryl, thanks for the reply. when i use the winscp gui i connect just fine, no problems at all. there is a '$' in the password. i am using the latest 5.5.1 (build 3970).

after looking through the forums i have tried the following in powershell without success:

orignal password is: blah$blah

password = "blah" + "%24" + "blah"

password = "blah" + %24 + "blah"
$a = 24; password = "blah" + $a + "blah"
$a = "{0:x}" -f 36; password = "blah" + $a + "blah"


nothing seems to work for me, any ideas on how to pass the '$' character as UTF-8 hex in powershell or how to make the pass actually work.
honey_cutt

@prikryl, thanks for the reply. when i use the winscp gui i connect just fine, no problems at all. there is a '$' in the password. i am using the latest 5.5.1 (build 3970).

after looking through the forums i have tried the following in powershell without success:

orignal password is: blah$blah

password = "blah" + "%24" + "blah"
password = "blah" + %24 + "blah"
$a = 24; password = "blah" + $a + "blah"
$a = "{0:x}" -f 36; password = "blah" + $a + "blah"

nothing seems to work for me, any ideas on how to pass the '$' character as UTF-8 hex in powershell or how to make the pass actually work.
martin

Re: Password Failed...

Are you able to connect using the password from WinSCP GUI? Is there some special character in your password? What version of WinSCP are you using? Have you tried 5.5.1?
honey_cutt

Password Failed...

I am trying to upload a file to an SFTP site using a powershell script. Each time i get an the error 'no supported authentication methods available'.

below is the code snippet and the log showing the error:

Powershell Code Snippet:

$sessionOptions = New-Object WinSCP.SessionOptions
$sessionOptions.Protocol = [WinSCP.Protocol]::Sftp
$sessionOptions.HostName = "ftp.site.com"
$sessionOptions.UserName = "username"
$sessionOptions.Password = "pass"
$sessionOptions.SshHostKeyFingerprint = "ssh-dss 1024 x:x:x:x:x:x:x:x:x:x:x:x:x:x:x:x"




Log Snippet:

! 2014-02-27 13:30:25.059 Using username "username".
! 2014-02-27 13:30:25.099 Further authentication required
. 2014-02-27 13:30:25.099 Further authentication required
. 2014-02-27 13:30:25.099 Prompt (7, SSH password, , &Password: )
. 2014-02-27 13:30:25.099 Using stored password.
. 2014-02-27 13:30:25.100 Sent password
. 2014-02-27 13:30:25.140 Password authentication failed
! 2014-02-27 13:30:25.140 Access denied
. 2014-02-27 13:30:25.141 Disconnected: No supported authentication methods available (server sent: )