>>- svctask -- -- addsshkey -- -- -label -- identifier -- ------> >-- -file -- filename_arg -- -- -user --+- admin ---+---------->< '- service -'
You must first copy the key file to the cluster in the /tmp directory using secure copy (scp).
The svctask addsshkey command moves the key file from the /tmp directory, to the required location and activates it for the given user. Once the key has been activated, you will be able to invoke commands on the cluster over SSH using the userid that was specified from the host for which the key was generated. Alternatively you can run an interactive SSH session from the specified host using the userid specified.
The identifier can be used to subsequently identify the key when all keys are listed using the svcinfo lssshkeys command, or if the key is to be deleted using the svctask rmsshkey command.
| Attention: After you add a cluster, close the Maintaining SSH Keys panel. |
You can issue the svcinfo lssshkeys command to list
the SSH keys that are available on the cluster. You can issue the svctask addsshkey command to install a new SSH key on the cluster. The
key file must first be copied onto the cluster. Each key is associated with
an ID string that you define that can consist of up to 30 characters. Up to
100 keys can be stored on a cluster. You can add keys to provide either administrator
access or service access. For example, type the following:
svctask addsshkey -user service -file /tmp/id_rsa.pub -label testkey
where /tmp/id_rsa.pub is the name of
the file that the SSH key will be saved in and testkey is the label to associate with this key.
You can issue the svctask rmsshkey command to remove an SSH key from the cluster. You can issue the svctask rmallsshkeys command to remove all of the SSH keys from the cluster.
An invocation example
svctask addsshkey -user service -file /tmp/id_rsa.pub -label testkey
The resulting output
No feedback