Creating Encrypted Command File for IBM i
Command File
In this example, a Universal Command command file named MYLIB/QTXTSRC(TESTLOGIN)
contains the following data:
-userid T02JAH1 -pwd tz74gan
Command File Options
The command file options used in this example are:
Option | Description |
User ID or account with which to execute the remote command. | |
Password associated with -userid. |
Encryption Command
The following command encrypts the command file using non-AES encryption with an encryption key MYKEY123 for default codepage IBM1047.
STRUEN INFILE(MYLIB/QTXTSRC) INMBR(TESTLOGIN) OUTFILE(MYLIB/ENCRYPTEDF) OUTMBR(ENCRYPTEDF) KEY(MYKEY123)
The resulting encrypted command file is written to file ENCRYPTEDF in MYLIB library.
Command Line Options
The command line options used in this example are:
Option | Description |
Input file that is to be encrypted. | |
Location of data in the input file that is to be encrypted. | |
File to which the encrypted input file is written. | |
Location of data in the file to which the encrypted input file is written. | |
Encryption key used by the encryption algorithm. |
Contents of Encrypted File
The figure below illustrates the contents of MYLIB/ENCRYPTEDF(ENCRYPTEDF)
.
This encrypted file now can be used as command file input for a Universal Agent command on any platform that uses the encryption key MYKEY123.