security login publickey create

Add a new public key

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.


The security login publickey create associates an existing public key with a user account. This command requires that you enter a valid OpenSSH-formatted public key, a user name, index number, and optionally, a comment.


-vserver <Vserver Name> - Vserver
This parameter optionally specifies the Vserver of the user for whom you are adding the public key.
-username <text> - Username
This parameter specifies the name of the user for whom you are adding the public key. If you do not specify a user, the user named admin is specified by default.
[-index <integer>] - Index
This parameter specifies an index number for the public key. The default value is the next available index value, starting with zero if it is the first public key created for the user.
-publickey <certificate> - Public Key
This specifies the OpenSSH public key, which must be enclosed in double quotation marks.
[-comment <text>] - Comment
This optionally specifies comment text for the public key. Note that comment text should be enclosed in quotation marks.


The following command associates a public key with a user named tsmith for Vserver vs1. The public key is assigned index number 5 and the comment text is “This is a new key”.
cluster1::> security login publickey create -vserver vs1 -username tsmith -index 5 -publickey 
-comment "This is a new key"