<< back to sysax.com Product page

16.4. Protecting passwords and other strings

The following switch encrypts the string that is passed in. It is part of a mechanism used to hide passwords and other important strings. The generated encrypted string can be used with the setprotectedvar command within a script. The contents of a protected variable will be automatically decrypted when the variable is passed to the ftpconnect* group of commands, the certload command, or the pkeyload command. In all other cases, including printing of the variable, only the encrypted value is made available.

-protectstring <string to be protected>      encrypt a string for use with the setprotectedvar command

Exhibit 16.4. Examples for using the switch for creating protected strings

sysaxftp -protectstring mypassword  #protect the "mypassword" string by encrypting it

sysaxftp -protectstring mypassword > passfile.txt  #encrypt "mypassword" and save it to passfile.txt where it can be copied and pasted inside a script for use with the setprotectedvar command.