# Key Pairs

The key pairs section enables the following actions: Add and Delete key pairs. Key pairs are commonly used by HPE Morpheus VM Essentials for accessing instances via SSH. HPE Morpheus VM Essentials stores key pairs to simplify administration and access across both private and public clouds.

HPE Morpheus VM Essentials only accepts key pairs in PEM format (for example, a private key beginning with `-----BEGIN RSA PRIVATE KEY-----`) and accepts RSA (PKCS#1 or PKCS#8, default), DSA (PKCS#1 or PKCS#8), EC (PKCS#8), and ed25519 (PKCS#8) keys. If you have a key in another format, such as OpenSSH, convert the key:

```
```
#No passphrase  
ssh-keygen -m pem -f /path/to/key  
#With passphrase  
ssh-keygen -p -P "old passphrase" -N "new passphrase" -m pem -f path/to/key
```
```

## Add Existing Key Pair

### About this task

To generate a existing Key Pair:

### Procedure

1. Navigate to Infrastructure > Trust > Key Pairs
2. On the Key Pairs tab, click + ADD and select “Existing Key Pair”
3. From the Add Key Pair modal input the following as needed: 

   - Name
   - Public Key
   - Private Key
   - Passphrase

   NOTE

   Certain features do not require storage of the private key.

## Generate Key Pair

### About this task

To generate a Key Pair:

### Procedure

1. Navigate to Infrastructure > Trust > Key Pairs
2. On the Key Pairs tab, click + ADD and select “Generate Key Pair”
3. After naming the new key pair, HPE Morpheus VM Essentials will reveal both the public and private key

### Results

NOTE

After the private key is initially revealed it will not be shown again. If needed, you may view the public key from the Keypairs list page at any time going forward. This key pair can be associated with your Linux user details in HPE Morpheus VM Essentials user settings. The public key will be added to the authorized\_keys file on provisioned workloads where your Linux user is added at provision time.

## Delete Key Pair

### About this task

To Delete Key Pair:

### Procedure

1. Navigate to Infrastructure > Trust > Key Pairs
2. On the Key Pairs tab, select the trash can icon at the end of any row
3. Acknowledge that you wish to delete the selected key pair
