--- title: "Generating and importing tokens for CM Peers using the CLI" slug: "generating-and-importing-tokens-for-cm-peers-using-the-cli-2" updated: 2026-08-25T21:17:42Z published: 2026-08-25T21:17:42Z canonical: "docs.trellix.com/generating-and-importing-tokens-for-cm-peers-using-the-cli-2" --- > ## 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. # Generating and importing tokens for CM Peers using the CLI Use the CLI commands to generate and import authentication tokens for CM peers. This section describes how to configure a single relationship with two CM peers. In this example, CM peer 1 (CMS1) is administered by Admin1 and CM peer 2 (CMS2) is administered by Admin2. ### Important After you import the token, a CM peer is able to interact with the CM Peer Service on your Central Management System appliance. The hostname of the CM peer is automatically used as the name of the peer, and the IP address is determined by the value of the token. All CM peers must have unique IP addresses and hostnames. ### Note You can export an existing token from a CM peer if you do not want to generate a new token. For details about how to export an existing authentication token, see [Exporting an Existing Token with a CM Peer Using the CLI](/docs/exporting-an-existing-token-from-a-central-management-system-peer-using-the-cli-1) . When you import the token, a CM peer is disabled, by default, while the features are enabled by default. To generate an authentication token for a CM peer: 1. Go to CLI configuration mode. ``` CMS1 > enable ``` ``` CMS1 # configure terminal ``` 2. (Admin1) Generate an authentication token. Partial output of the generated token is displayed. ``` CMS1 (config) # cms peer-service auth-token generate ``` ``` AUTH-TOKEN = "PD94bWwg.........." ``` ``` ``` ``` AUTH-TOKEN CHECKSUM = "cc47ba112df7e0743a41761491435ffb" ``` ``` . ``` ``` . ``` ``` . ``` 3. (Admin1) Copy all the characters within the quotes, but do not copy the quotes, from the generated auth-token. 4. (Admin1) Paste the token of CMS1 to an out-of-band mechanism (for example, a signed email). 5. (Admin1) Send the generated token of CMS1 to Admin2 through a secure out-of-band mechanism (for example, a signed email). To import an authentication token for peer setup: 1. Go to CLI configuration mode. ``` CMS2 > enable ``` ``` CMS2 # configure terminal ``` 2. (Admin2) Import the authentication token from CMS1. Paste the generated token of CMS1 on the same line as the command. ``` CMS2 (config) # cms peer-service auth-token import ``` ### Note The actual hostname of CMS1 is automatically used after the token has been imported. 3. (Admin2) Generate an authentication token for CMS2. ``` CMS2 (config) # cms peer-service auth-token generate ``` ``` ``` ``` AUTH-TOKEN = "PD94bWwg.........." ``` ``` ``` ``` AUTH-TOKEN CHECKSUM = "360a37cc532b9e2e75b674eb3b5fe2e0" ``` ``` . ``` ``` . ``` ``` . ``` 4. (Admin2) Copy all the characters within the quotes, but do not copy the quotes, from the generated auth-token. 5. (Admin2) Paste the token of CMS2 to an out-of-band mechanism (for example, a signed email). 6. (Admin2) Send the generated token of CMS2 to Admin1 through a secure out-of-band mechanism (for example, a signed email). 7. (Admin1) Import the authentication token from CMS2. Paste the generated token of CMS2 on the same line as the command. ``` CMS1 (config) # cms peer-service auth-token import ``` ### Note The actual hostname of the CMS2 is automatically used after the token has been imported. 8. (Admin1) Verify that CMS1 is connected to CMS2. ``` CMS1 (config) # show cms peer-service ``` ``` CMS peer-service enabled:          yes ``` ``` ----------------------------------------------------------------------- ``` ```   CMS peer CMS2: ``` ```      Enabled:                     no ``` ```      Hostname:                    CMS2 ``` ```      Address:                     172.16.216.51 ``` ```      Auth-token checksum:         360a37cc532b9e2e75b674eb3b5fe2e0 ``` ```      . ``` ```      . ``` ```      . ``` ``` ----------------------------------------------------------------------- ``` 9. (Admin2) Verify that CMS2 is connected to CMS1. ``` CMS2 (config) # show cms peer-service ``` ``` CMS peer-service enabled:          yes ``` ``` ----------------------------------------------------------------------- ``` ``` CMS peer CMS1: ``` ```   Enabled:                     no ``` ```   Hostname:                    CMS1 ``` ```   Address:                     10.11.121.13 ``` ```   Auth-token checksum:         cc47ba112df7e0743a41761491435ffb ``` ```   . ``` ```   . ``` ```   . ``` ``` ----------------------------------------------------------------------- ``` ### Note For multiple CM peers, repeat these steps on each CM peer until all the authentication tokens are imported on all the peers. :