Allows key-based SSH authentication between two systems. This updates the ~/.ssh/authorized_keys2 file with the specified public key. It can also be used to push the users public key to a remote Integrated Virtualization Manager or HMC system.
To add the SSH key as an authorized key locally:
mkauthkeys { -a | --add } <key string>
To remove the SSH key locally:
mkauthkeys { -r | --remove } [ -u <user> ] <key string>
To exchange public keys with a remote system:
mkauthkeys { -a | --add } -- ip <remote system> [ -u <user> ] <key string>
To test the remote non-interactive authentication using the SSH key:
The mkauthkeys command updates the Integrated Virtualization Manager user's authorized_keys2 file.
Flag name | Description |
---|---|
-a | Adds the ssh command key. |
-g | Displays the public key for the specified user and generates the user's public and private key pair if they do not exist. |
-r | Removes the key for the specified user ID and host. |
--add | Adds the ssh command key. |
--remove | Removes the key for the specified user ID and host. |
--test | Verifies authentication to the remote host |
--ip <remote server IP> | Allows installing this user's public key on the specified remote HMC or Integrated Virtualization Manager system for the user specified with -u flag. If -u flag is not specified, the remote user's public key will be installed on the local system. |
-u username | Specifies the user name to add or remove the key. You must have hmcsuperadmin or PAdmin authority to add or remove key for other users. |
key string | The ssh command key to add to or the ID to remove. |
This command has a return code of 0 on success.
mkauthkeys -a 'adB8fqeZs2d-gg+q joe@somehost
mkauthkeys -g
mkauthkeys -g -u fred
mkauthkeys -r 'adB8fqeZs2d-gg+q joe@somehost'
mkauthkeys -r 'joe@somehost'
mkauthkeys -a --ip remote.host -u fred
mkauthkeys -a ssh-rsa thersakeygoeshere= user@somesystem
mkauthkeys -r ssh-rsa thersakeygoeshere= user@somesystem
mkauthkeys -r user@somesystem
mkauthkeys -r -u user ssh-rsa thersakeygoeshere= user@somesystem
mkauthkeys -a --ip othersystem.com
mkauthkeys -a --ip othersystem.com -u user
mkauthkeys --test --ip othersystem.com
mkauthkeys --test --ip othersystem.com -u user