Creating Encrypted Command File - IBM i
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 tz76gan
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)
.
# Universal Encrypt # Created on Wed Feb 22 18:43:51 2011 # Created by uencrypt 3.2.0 Level 0 9ACB96416816600CB9D24C9072D80C11768B93CB0E79B944EC37D3495097AD793F97699220C9BB 472DF1E04F5BA8909BCA6C8C72DFD3B706487B1713E6F76F5A0539F17076DEF6D14083EF6E7023 158526E70BE3AF688579805DCAC0CFF1EB6A
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.