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

martin

Thanks for all the details.

toto21 wrote:

To correct this behavior would have when the pattern !P is present in Putty/Terminal client path (logically Remember session password and it pass it to Putty(SSH) is not checked)
then the password is sent (I hope in 5.9.1)

It should have behaved like this, but it didn't.
This bug has been added to the tracker:
https://winscp.net/tracker/1443

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.
toto21

I really understand after reinstall 5.7 for my jog :oops:

C:\cygwin\bin\mintty.exe -t  !@ /bin/bash -ile /home/user/winscpscript/ssh.sh !U !@ !P

becomes on 5.9
C:\cygwin\bin\mintty.exe -pw mypassword -t  myhost /bin/bash -ile /home/user/winscpscript/ssh.sh myuser myhost mypassword

-pw is sent before other arguments

becomes on 5.7
C:\cygwin\bin\mintty.exe -t  myhost /bin/bash -ile /home/user/winscpscript/ssh.sh myuser myhost mypassword -pw mypassword

-pw is sent after other arguments

This is the real change between the two versions :(
toto21

Hello Martin,
I think I understand what changed.
Before (4.7 version) when checked option Remember session password and it pass it to Putty(SSH) (in Preferences>Integration>Applications) it did not add -pw password to the command line options (for mintty the -p option expects coordinated and not a letter (here w) - which causes an error see https://mintty.github.io/mintty.1.html).
In my case :
C:\cygwin\bin\mintty.exe -t  !@ /bin/bash -ile /home/user/winscpscript/ssh.sh !U !@ !P

becomes
C:\cygwin\bin\mintty.exe -pw mypassword -t  myhost /bin/bash -ile /home/user/winscpscript/ssh.sh myuser myhost mypassword


When the option Remember session password and it pass it to Putty(SSH) is not checked the command becomes :
C:\cygwin\bin\mintty.exe -t  myhost /bin/bash -ile /home/user/winscpscript/ssh.sh myuser myhost
in this case it is script shell the script that bugs (mising third argument : mypassword).

To correct this behavior would have when the pattern !P is present in Putty/Terminal client path (logically Remember session password and it pass it to Putty(SSH) is not checked)
then the password is sent (I hope in 5.9.1)

Martin thank you again for all the energy that you put to reply to this post.
Regards
Claude
martin

Please hold down Shift + Ctrl while clicking the Open in PuTTY command.
It will make WinSCP copy the resolved command to the clipboard.
Please post the command here.
toto21

Sorry indeed it was not very clear (my english is bad),
In fact it is as if Winscp 5.9 added an option (certainly for putty) to the command line that triggers an error for mintty
martin

What do you mean by "add a plus option mintty"?
toto21

Yes,
Whatever sh script is the interpretation of Client PuTTY/Terminal path
that changed with the verson 5.9 (I have not tested 5.8)

In fact it is as if the 5.9 add a plus option mintty (certainly for putty) - this is what is new with this version of winscp
martin

So can you please find out what does WinSCP 5.9 differently that it breaks the script? It's not obvious to me. And I do not have mintty.
toto21

Hello Martin,
Thanks for your response.
Now, with latest version 5.9 when Ctrl P to open ssh session i have this error message :

mintty syntax error in position 'w'
So i downgrad to 5.7 version and it's ok.
martin

Re: Mintty (Cygwin) and version 5.9 error : mintty syntax error in position 'w'

Sorry, I do not understand what is the problem. Can you explain?
toto21

Mintty (Cygwin) and version 5.9 error : mintty syntax error in position 'w'

The latest version 5.9 prevents execution of mintty (Cygwin) via Options> Prerences> Integration> Applications> Client PuTTYerminal path:
C:\cygwin\bin\mintty.exe -t  !@ /bin/bash -ile /home/user/winscpscript/ssh.sh !U !@ !P


Error :
mintty syntax error in position 'w'


My sh script to manage exotic ports such as ssh 15322 ... and the passing of my password to my clipboard (I know it's not good but so practical)

#/bin/sh

echo "Connection $1@$2"
# copy pwd in clipboard - Once connected thinking (for security) to select anything to crush mintty clipboard
printf  $3 >/dev/clipboard
if [ $1 ==  'user_name_ssh' ]
then
   ssh -p 15322 ${1}@${2}
....

else
   ssh ${1}@${2}
fi


Thank you to consider this in the next version of winscp
cf other post : https://winscp.net/forum/viewtopic.php?t=16243