Preparing for an SSH connection between IBM i and SVC storage (7.4)
Background
Communication between PowerHA and SVC is done using SSH. You must create SSH key pairs and attach the SSH public key to a user on the storage system. The corresponding private key file is specified when adding copy descriptions later in the configuration.
Before you begin
This scenario assumes that the following tasks have been completed prior to these steps:
5770-SS1 Option 33 - Portable Application Solution Enviornment (PASE) is installed on all nodes in the cluster.
5733-SC1 *BASE and Option 1 - IBM Portable Utilities for i and OpenSSH, OpenSSL. zlib is installed on all nodes in the cluster
Procedure
Generate the SSH Key pair
The ssh-keygen command is used to generate a key pair.
Sign on with a user that has *ALLOBJ authority.
Go to Qshell by typing
QSH
.Make the directory for the key pair:
mkdir /QIBM/UserData/HASM/hads/.ssh/
Ensure the ownership of the .ssh directory is QHAUSRPRF:
chown /QIBM/UserData/HASM/hads/.ssh/ QHAUSRPRF
Ensure the permissions of the .ssh directory limits access to just QHAUSRPRF:
chmod 0700 /QIBM/UserData/HASM/hads/.ssh/
Navigate to the .ssh directory:
cd /QIBM/UserData/HASM/hads/.ssh/
Use the ssh-keygen command to generate a public/private key pair. For example:
ssh-keygen -t rsa -f id_rsa -N ''
The id_rsa file is the private key file that PowerHA uses to authenticate with the storage. The id_rsa.pub file is the public key file that is imported and associated with a user on the storage system.
Warning: PowerHA does not support using passphrases with the ssh keys. If prompted for a passphrase when generating an ssh key pair, press enter to generate a key pair with no passphrase.
Change the ownership and authority of the private key to QHAUSRPRF:
chown /QIBM/UserData/HASM/hads/.ssh/id_rsa QHAUSRPRF
chmod 0600 /QIBM/UserData/HASM/hads/.ssh/id_rsa QHAUSRPRF
Distribute the private key to other nodes in the Cluster
PowerHA expects the same private key file to be on all nodes in the cluster.
Create the same directory on other nodes in the cluster:
Go to Qshell by typing
QSH
.Make the directory for the key pair:
mkdir /QIBM/UserData/HASM/hads/.ssh/
Ensure the ownership of the .ssh directory is QHAUSRPRF:
chown /QIBM/UserData/HASM/hads/.ssh/ QHAUSRPRF
Ensure the permissions of the .ssh directory limits access to just QHAUSRPRF:
chmod 0700 /QIBM/UserData/HASM/hads/.ssh/
Use a file transfer mechanism such as FTP or SCP to transfer the private key to the directory /QIBM/UserData/HASM/hads/.ssh/ on the other nodes.
Change the ownership and authority of the private key to QHAUSRPRF:
chown /QIBM/UserData/HASM/hads/.ssh/id_rsa QHAUSRPRF
chmod 0600 /QIBM/UserData/HASM/hads/.ssh/id_rsa QHAUSRPRF
Repeat these steps for each node in the cluster
Associate the Public Key file with a user on the Storage Controller
The file name that ends in .pub, such as id_rsa.pub contains the public key. This file must be transferred to the storage controller and assigned to a user that has enough authority to perform PowerHA operations.
Transfer the public key file to your PC.
Log into the storage system GUI interface.
If you are logged in as the user that PowerHA will be using, click the user icon in the upper-right of the screen and select Manage SSH public Key.
Check the box to enable CLI access via SSH key exchange.
Browse to select the public key file transferred in step 1.
Click OK to save the changes
If you are not logged in as the user that PowerHA will be using, create or modify the user:
Navigate to Access → Users by Group.
If the user does not exist, click Create User
Give the user a name such as
powerha_mycluster
For authentication mode use local.
Select a security group.
Storage User Authority
For Performing replication functionality such as Metro Mirror, Global Mirror, or Asynchronous Policy-based Replication, PowerHA requires a minimum role of Copy Operator. If you want to use LUN-Level switching, the user in the storage must have a minimum role of Administrator because PowerHA must change host attachments when switching the IASP between systems.
iv. Select browse to specify the public key file such as id_rsa.pub.
Security Tip
It is not required to have a password set for the user that PowerHA uses. Therefore, we recommend not configuring a password. This will ensure that the only way to log in as this user is using the ssh private key.
v. Click Create.
If using replication such as Metro Mirror, Global Mirror, or Asynchronous Policy-based Replication, configure the user and keyfile for the second storage controller.
Results
The ssh keyfiles are created and distributed between nodes in the PowerHA cluster and the storage controllers are configured for ssh key authentication. PowerHA will be configured to use these key files when adding copy descriptions.
Related content
Privacy Policy | Cookie Policy | Impressum
From time to time, this website may contain technical inaccuracies and we do not warrant the accuracy of any posted information.
Copyright © Fortra, LLC and its group of companies. All trademarks and registered trademarks are the property of their respective owners.