--- title: "Creating a public key using the CLI" slug: "creating-a-public-key-using-the-cli-8" tags: ["File Protect (FX)", "Malware Analysis (AX)", "IAM", "Email Security - Cloud", "Network Security (NX)", "Email Security — Server", "Central Management System", "Helix Enterprise", "Endpoint Security (HX)", "Product Usage", "Install and Get Started", "Helix", "Intelligent Virtual Execution "] updated: 2026-10-01T11:53:56Z published: 2026-10-01T11:53:56Z canonical: "docs.trellix.com/creating-a-public-key-using-the-cli-8" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Creating a public key using the CLI Use the commands in this section to create a new public key for SSH user authentication. You can use this key instead of the password to authenticate the remote user. ### Note (Central Management System only) If no SSH-DSA2 or SSH-RSA2 public keys exist, you can use the Web UI to create an "admin" SSH-DSA2 key and an "admin" SSH-RSA2 key. For details, see [Importing a host key into the global host-keys database using the Web UI](/network-and-platform/docs/importing-a-host-key-into-global-host-keys-database-central-management-system-we-1). To create a public key: 1. Go to CLI configuration mode: ```plaintext hostname > enable hostname # configure terminal ``` 2. Create the public key: ```plaintext hostname (config) # cmc auth identity generate ``` where` <keyType> `can be `ssh-dsa2` or `ssh-rsa2` and` <identityName> `is a user-friendly name. 3. Verify your changes: ```plaintext hostname (config) # show cmc auth identities ``` 4. Save your changes: ```plaintext hostname (config) # write memory ``` 5. (Central Management System only) Push the key to the managed appliance as described in [Pushing a public key using the CLI](/docs/pushing-a-public-key-using-the-central-management-system-cli). To remove a public key: 1. Go to CLI configuration mode: ```plaintext hostname > enable hostname # configure terminal ``` 2. Remove the public key: ```plaintext hostname (config) # no cmc auth identity ``` 3. Verify your change: ```plaintext hostname (config) # show cmc auth identities ``` 4. Save your changes: ```plaintext hostname (config) # write memory ``` ### Example The following example creates an SSH-DSA2 identity named "admin4" on the NX-04 appliance. ```plaintext NX-04 (config) # cmc auth ssh-dsa2 identity admin4 NX-04 (config) # show cmc auth identities DSA2 identity admin4:   Public Key: ssh-dss AAA3NzaC1kc3MAAACBAJl3PisWNnz/gYLvL4JC7xFMoq3HE89rai7trnJmpxjylArYhf MzaGndFA4qGRZMFzhiz9Jhi/+W1ufIrXLGzakC0lAAAAFQCuMCsMwMGN9zT5w2JCiDt7D6orNwAA . . . ``` ### Note This example is from an Network Security appliance, but it is representative of other appliances as well. :