Password must be entered after WinSCP update

Advertisement

Kenjiro
Guest

Password must be entered after WinSCP update

I was doing a file transfer from a batch file using a script in WinSCP with a host key (ssh-rsa 2048). I recently updated WinSCP from version 5.5.3 (build 4214) to version 5.19.6 (build 12002).
As a result, the batch file now prompts you to enter a password that was not required in previous versions when running WinSCP.
What should I do to avoid entering the password? Thank you.

< Server >
Windows Server 2016 Standard

< Bat Command >
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /console /script="Script.txt" /log="WinSCP.log"
< Script.txt >
option batch on
open sftp://UserName@ServerName -hostkey="ssh-rsa 2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99"
option confirm off
cd /local/folder
put Files
exit

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,034
Location:
Prague, Czechia

Re: Password must be entered after WinSCP update

This is most likely caused by this change:
Issue 1647 – Do not match URL after stripping protocol against stored site name in scripting/automation

So either add the password to your script. Or if you want to keep relying on the stored password (not recommended), use the actual name of your stored site in the open command. I assume the name is UserName@ServerName, not sftp://UserName@ServerName.

If you still have problems, please post session log file.

Reply with quote

kenjiro
Joined:
Posts:
1
Location:
Japan

Re: Password must be entered after WinSCP update

Hello Martin,
Thank you for your support and information. I will check the connection method based on the information from you.
Sincerely,
Kenjiro

Reply with quote

Advertisement

You can post new topics in this forum