Encryption of the password for CLI use

Advertisement

Individuum
Joined:
Posts:
1

Encryption of the password for CLI use

Hi,

I am currently using the CLI function to push files to a server with the following script:
@echo off
 
set server=server-ip
set user=user
set pass=password
 
"C:\Program Files (x86)\WinSCP\WinSCP.com" /command "open sftp://%user%:%pass%@%server%/" "put -neweronly D:\VeeamBackup\Job\* /mnt/backup_user_001/" "exit"
Unfortunately, the logins are in plain text.
Is there a way to write the password in encrypted form, for example in the registry or in a text file, and to decrypt the entry when the script is executed and use it at the appropriate place in the script?

I have already read the article on "Using WinSCP scripting". However, the login details are still in plain text in the file.

How can I hide the plain text / encrypt the plain text?

Reply with quote

Advertisement

Guest

Yes, I had already seen that.
However, the configuration file in which the login details are located must be somewhere and there are plain text details in it.

Reply with quote

martin
Site Admin
martin avatar

Ok, then I do not understand your question. The article explains that what you ask for is technically not possible.

Reply with quote

Advertisement

You can post new topics in this forum