After executing a script in Aix, You need to remotely call a script in RedHat and use remote SSH to record it.
1. Install SSH on AIX
The Aix CD comes with an SSH installation package. Because my AIX is managed under VIO, I upload the ISO file to the AIX server through FTP and execute loopmount
Loopmount-I/czz7yml. iso-M/mnt-o "-V cdrfs-O ro"
If you want to insert a CD to the optical drive, the Mount method is: Mount-RV cdrfs/dev/cd0/DVD.
Execute Smitty installp
1) Select "Install software bundle"
2) Select "/mnt" in directory"
3) Select the bottom openssh_client and press Enter.
4). Select Yes for "accept new license agreement" and press enter to install
5). Select openssh_server in step 1 for installation.
2. Export public keys
Because the script in RedHat is remotely called on AIX, You need to export the public key on AIX and then import it to RedHat:
1. Execute the command ssh-keygen-t dsa-p'-f //. Ssh/id_dsa on the AIX side (// representing the Home Directory)
Bash-3.2 # ssh-keygen-t dsa-p'-f //. Ssh/id_dsa
Generating public/private DSA key pair.
Created directory ''.
Your identification has been saved in //. Ssh/id_dsa.
Your public key has been saved in //. Ssh/id_dsa.pub.
The key fingerprint is:
9f: EC: C8: 6d: 21: 92: 89: 8f: E2: 09: 26: 7d: A1: 48: D9: 7A root @ vega56
The key's randomart image is:
+ -- [DSA 1024] ---- +
|
|
|
| O |
| O... OS |
|. O... +. O... |
| + OOE. O... +. |
| O. Oo... +. |
|. O |
+ ----------------- +
Copy the generated id_dsa.pub to the RedHat server.
2. Run the command cat id_dsa.pub> ~ On the RedHat side ~ /. Ssh/authorized_keys
At this point, direct remote access to Aix and RedHat is completed. Let's check the following:
Run SSH root @ RHEL ls on the AIX side.
RHEL is the access address of RedHat. The preceding command indicates that the file list in the current RedHat Directory is displayed on the AIX end by calling the LS script in RedHat by the root user. Therefore, the test is successful.
Note: This method also applies to RedHat and RedHat. The difference is that ssh-keygen-t dsa-p'-F/root/is executed in 2.1 /. SSH/id_dsa, home directory is/root