Topic "Dynamically Changing Hostname in INI file"

Author Message
jasongauthier1
[View user's profile]

Joined: 2011-08-04
Posts: 1
Location: US
Hello,

I have numerous hosts that I need to connect to in order to retrieve a file. The login names and passwords are identical to each other. The only difference is the host name, so I've developed a script that will change the hostname in the file and leave the UID/PW intact. I can see in the INI file that everything is correct for the session, however, when I try to connect, I am prompted for keyboard-interactive authentication as if it doesn't have a password stored for the session, even though I see it in the INI file.

Please advise.

Thanks,
Jason
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
The password is encrypted with hostkey (and username) as a key. So if you change hostname, the password becomes invalid. You can store password unencrypted.

Please read documentation:
http://winscp.net/eng/docs/custom_distribution#distributing_passwords
_________________
Martin Prikryl
Guest




Thanks, that's helpful information. I don't see the option in WinSCP.exe when creating the session. I have 4.2.8 - do I need a newer version? I understood you to mean that it's an option when creating the session and not a switch that I include when opening the session, correct?
Guest




Actually, I see now how to use the PasswordPlain attribute; however, when I adjust the INI to read PasswordPlain=XXXXXX, then save the file and connect to the host, the configuration is changed back to Password=<EncryptedPassword>

Please advise.

Thanks,
Jason
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Anonymous wrote:
Actually, I see now how to use the PasswordPlain attribute; however, when I adjust the INI to read PasswordPlain=XXXXXX, then save the file and connect to the host, the configuration is changed back to Password=<EncryptedPassword>

But that should not matter in your scenario, shoudn't it?
_________________
Martin Prikryl
Guest




prikryl wrote:
Anonymous wrote:
Actually, I see now how to use the PasswordPlain attribute; however, when I adjust the INI to read PasswordPlain=XXXXXX, then save the file and connect to the host, the configuration is changed back to Password=<EncryptedPassword>

But that should not matter in your scenario, shoudn't it?


Good point. I will revisit. Thanks for your help.

Jason
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License