Pass string for "Further authentication required" in script

Advertisement

Baseline
Guest

Pass string for "Further authentication required" in script

Hi,

(Using V4.3.5 on Win2k3. Protocol when connected via GUI is SFTP-3.)

We use WinSCP successfully to connect to 1 site and now have a requirement to use it to connect to another.

For this second site, we store the private key in Pageant and that authenticates fine. After that step, it asks for a second password while displaying the message "Further authentication required" (as per attachment 1.png). If I type the password into the GUI it works fine. The second password is a requirement of the people we are connecting to.

For the purpose of this connection, we need to script it to schedule it to run every 90 mins, 24 hours a day. My script currently looks like this:
The command line:
"C:\Program Files\WinSCP\WinSCP.com" "<SITE NAME>" /script=c:\<SITE NAME>\Scripts\test.txt

The script (test.txt):
# Download Today's 1830 FP File
get %date_dd%%date_mm%%date_yy%* C:\<SITE NAME>\Download\%date_dd%%date_mm%%date_yy%n.DAT
# Disconnect
Close
# Exit
Exit

When I run this, I get the message in attachment 2.png. Again, if I type in this password it connects.

However, since there is a requirement to automate it (as we don't currently work 24 hours a day) I'm looking for a way to pass the second password through as part of the script (I know the password will be shown in clear text in the script file). I've had a look in the scripting guides and can't see anything (I don't read C# so I can't tell if it's possible in .NET Assembly or not).

Any help would be much appreciated.

Many thanks

2.png

1.png

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Pass string for "Further authentication required" in script

Have you tried saving the password in the stored session you are opening?

Reply with quote

Baseline
Guest

Pass string for "Further authentication required" in script

Hi

That worked - thanks very much!

I didn't think to try that as I thought it would overrule the private key and try to authenticate by password.

I'll take a look at the 'open' command and adjust my script as appropriate.

Many thanks
Andy

Reply with quote

sundar2013
Joined:
Posts:
8

Re: Pass string for "Further authentication required" in script

Hi Andy,

What change you did in the Script to fix this issue.

Can you please let me know, because I am also facing the same problem.

Thanks.
Sundaramurthy J.

Reply with quote

Advertisement

You can post new topics in this forum