

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# Guida introduttiva a AWS CloudHSM key\$1mgmt\$1util
<a name="key_mgmt_util-getting-started"></a>

AWS CloudHSM [include due strumenti da riga di comando con il software client.AWS CloudHSM](kmu-install-and-configure-client-linux.md#kmu-install-client) Lo strumento [cloudhsm\$1mgmt\$1util](cloudhsm_mgmt_util-reference.md) include comandi per gestire gli utenti HSM. Lo strumento [key\$1mgmt\$1util](key_mgmt_util-reference.md) include comandi per gestire le chiavi. Per iniziare a utilizzare lo strumento a riga di comando key\$1mgmt\$1util, vedi i seguenti argomenti. 

**Topics**
+ [Configurazione](key_mgmt_util-setup.md)
+ [Accedi a HSMs](key_mgmt_util-log-in.md)
+ [Esci dal HSMs](key_mgmt_util-log-out.md)
+ [Arresto di key\$1mgmt\$1util](key_mgmt_util-stop.md)

In caso di messaggio di errore o risultato imprevisto per un comando, vedi gli argomenti [Risoluzione dei problemi AWS CloudHSM](troubleshooting.md) per ricevere assistenza. Per dettagli sui comandi key\$1mgmt\$1util, vedi [Riferimento per i comandi della AWS CloudHSM Key Management Utility](key_mgmt_util-reference.md). 

# Configura AWS CloudHSM key\$1mgmt\$1util
<a name="key_mgmt_util-setup"></a>

Completa la seguente configurazione prima di utilizzare key\$1mgmt\$1util (KMU). AWS CloudHSM 

**Topics**
+ [Passaggio 1. AWS CloudHSM Avvia il client](#key_mgmt_util-start-cloudhsm-client)
+ [Passaggio 2. Avvio di key\$1mgmt\$1util](#key_mgmt_util-start)

## Passaggio 1. AWS CloudHSM Avvia il client
<a name="key_mgmt_util-start-cloudhsm-client"></a>

Prima di utilizzare key\$1mgmt\$1util, è necessario avviare il client. AWS CloudHSM Il client è un demone che stabilisce end-to-end una comunicazione crittografata con i membri del cluster. HSMs Lo strumento key\$1mgmt\$1util utilizza la connessione client per comunicare con i membri del cluster. HSMs Senza ciò, key\$1mgmt\$1util non funziona. 

**Per AWS CloudHSM avviare il client**  
Usa il seguente comando per avviare il AWS CloudHSM client.

------
#### [ Amazon Linux ]

```
$ sudo start cloudhsm-client
```

------
#### [ Amazon Linux 2 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ CentOS 7 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ CentOS 8 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ RHEL 7 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ RHEL 8 ]

```
$ sudo service cloudhsm-client start
```

------
#### [ Ubuntu 16.04 LTS ]

```
$ sudo service cloudhsm-client start
```

------
#### [ Ubuntu 18.04 LTS ]

```
$ sudo service cloudhsm-client start
```

------
#### [ Windows ]
+ Per client Windows dalla versione 1.1.2\$1:

  ```
  C:\Program Files\Amazon\CloudHSM>net.exe start AWSCloudHSMClient
  ```
+ Per client Windows 1.1.1 e versioni precedenti:

  ```
  C:\Program Files\Amazon\CloudHSM>start "cloudhsm_client" cloudhsm_client.exe C:\ProgramData\Amazon\CloudHSM\data\cloudhsm_client.cfg
  ```

------

## Passaggio 2. Avvio di key\$1mgmt\$1util
<a name="key_mgmt_util-start"></a>

Dopo aver avviato il AWS CloudHSM client, utilizzate il seguente comando per avviare key\$1mgmt\$1util.

------
#### [ Amazon Linux ]

```
$ /opt/cloudhsm/bin/key_mgmt_util
```

------
#### [ Amazon Linux 2 ]

```
$ /opt/cloudhsm/bin/key_mgmt_util
```

------
#### [ CentOS 7 ]

```
$ /opt/cloudhsm/bin/key_mgmt_util
```

------
#### [ CentOS 8 ]

```
$ /opt/cloudhsm/bin/key_mgmt_util
```

------
#### [ RHEL 7 ]

```
$ /opt/cloudhsm/bin/key_mgmt_util
```

------
#### [ RHEL 8 ]

```
$ /opt/cloudhsm/bin/key_mgmt_util
```

------
#### [ Ubuntu 16.04 LTS ]

```
$ /opt/cloudhsm/bin/key_mgmt_util
```

------
#### [ Ubuntu 18.04 LTS ]

```
$ /opt/cloudhsm/bin/key_mgmt_util
```

------
#### [ Windows ]

```
PS C:\> & "C:\Program Files\Amazon\CloudHSM\key_mgmt_util.exe"
```

------

Il prompt cambia in `Command:` quando key\$1mgmt\$1util è in esecuzione.

Se il comando ha esito negativo, ad esempio se restituisce un messaggio `Daemon socket connection error`, prova ad [aggiornare il file di configurazione](troubleshooting-lost-connection.md). 

# Accedi a un cluster usando KMU HSMs AWS CloudHSM
<a name="key_mgmt_util-log-in"></a>

Utilizzate il **loginHSM** comando in key\$1mgmt\$1util (KMU) per accedere ai moduli di sicurezza hardware (HSM) in un cluster. AWS CloudHSM Il comando seguente effettua l'accesso come [crypto user (CU)](understanding-users-cmu.md) nominato `example_user`. L'output indica un accesso riuscito per tutti e tre i membri del cluster. HSMs 

```
Command:  loginHSM -u CU -s example_user -p <PASSWORD>
Cfm3LoginHSM returned: 0x00 : HSM Return: SUCCESS

Cluster Error Status
Node id 0 and err state 0x00000000 : HSM Return: SUCCESS
Node id 1 and err state 0x00000000 : HSM Return: SUCCESS
Node id 2 and err state 0x00000000 : HSM Return: SUCCESS
```

Di seguito è mostrata la sintassi del comando **loginHSM**.

```
Command:  loginHSM -u <USER TYPE> -s <USERNAME> -p <PASSWORD>
```

# Esci da un AWS CloudHSM cluster utilizzando KMU HSMs
<a name="key_mgmt_util-log-out"></a>

Utilizzate il **logoutHSM** comando in key\$1mgmt\$1util (KMU) per disconnettervi dai moduli di sicurezza hardware (HSM) in un cluster. AWS CloudHSM 

```
Command:  logoutHSM
Cfm3LogoutHSM returned: 0x00 : HSM Return: SUCCESS

Cluster Error Status
Node id 0 and err state 0x00000000 : HSM Return: SUCCESS
Node id 1 and err state 0x00000000 : HSM Return: SUCCESS
Node id 2 and err state 0x00000000 : HSM Return: SUCCESS
```

# AWS CloudHSM Arresta key\$1mgmt\$1util
<a name="key_mgmt_util-stop"></a>

Usa il comando per fermare key\$1mgmt\$1util. **exit** AWS CloudHSM 

```
Command:  exit
```