Skip to content

Commit 9f01f96

Browse files
committed
Fix tabs and numbered list
1 parent e877d81 commit 9f01f96

File tree

1 file changed

+22
-32
lines changed

1 file changed

+22
-32
lines changed

articles/iot-edge/how-to-provision-devices-at-scale-linux-tpm.md

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -143,51 +143,41 @@ After the installation is finished and you've signed back in to your VM, you're
143143

144144
In this section, you use the TPM2 software tools to retrieve the endorsement key for your TPM and then generate a unique registration ID.
145145

146-
1. Sign in to your device, and install the `tpm2-tools` package.
146+
# [Ubuntu / Debian / Raspberry Pi OS](#tab/ubuntu+debian+rpios)
147147

148+
1. Sign in to your device, and install the `tpm2-tools` package.
148149

149-
# [Ubuntu](#tab/ubuntu)
150+
```bash
151+
sudo apt-get install tpm2-tools
152+
```
150153

154+
1. Run the following commands to read the endorsement key in your TPM and generate a unique registration ID. This assumes the endorsement key is at the default location of 0x81010001.
151155

152-
```bash
153-
sudo apt-get install tpm2-tools
154-
155-
```
156+
```bash
157+
tpm2_readpublic -Q -c 0x81010001 -o ek.pub
158+
printf "Gathering the registration information...\n\nRegistration Id:\n%s\n\nEndorsement Key:\n%s\n" $(sha256sum -b ek.pub | cut -d' ' -f1) $(base64 -w0 ek.pub)
159+
```
156160

157-
# [Debian](#tab/debian)
158-
159-
160-
```bash
161-
sudo apt-get install tpm2-tools
162-
163-
```
164-
165-
# [Raspberry Pi OS](#tab/rpios)
166-
167-
168-
```bash
169-
sudo apt-get install tpm2-tools
170-
171-
```
161+
1. The output window displays the device's **Registration ID** and the **Endorsement key**. Copy these values for use later when you create an individual enrollment for your device in the device provisioning service.
172162
173163
# [Red Hat Enterprise Linux](#tab/rhel)
174164
165+
1. Sign in to your device, and install the `tpm2-tools` package.
175166
176-
```bash
177-
sudo yum install tpm2-tools
178-
179-
```
167+
```bash
168+
sudo yum install tpm2-tools
169+
```
180170
181-
---
171+
1. Run the following commands to read the endorsement key in your TPM and generate a unique registration ID. This assumes the endorsement key is at the default location of 0x81010001.
182172
183-
1. Run the following commands to read the endorsement key in your TPM and generate a unique registration ID. This assumes the endorsement key is at the default location of 0x81010001.
173+
```bash
174+
tpm2_readpublic -Q -c 0x81010001 -o ek.pub
175+
printf "Gathering the registration information...\n\nRegistration Id:\n%s\n\nEndorsement Key:\n%s\n" $(sha256sum -b ek.pub | cut -d' ' -f1) $(base64 -w0 ek.pub)
176+
```
184177
185-
```bash
186-
tpm2_readpublic -Q -c 0x81010001 -o ek.pub
187-
printf "Gathering the registration information...\n\nRegistration Id:\n%s\n\nEndorsement Key:\n%s\n" $(sha256sum -b ek.pub | cut -d' ' -f1) $(base64 -w0 ek.pub)
188-
```
178+
1. The output window displays the device's **Registration ID** and the **Endorsement key**. Copy these values for use later when you create an individual enrollment for your device in the device provisioning service.
189179

190-
1. The output window displays the device's **Registration ID** and the **Endorsement key**. Copy these values for use later when you create an individual enrollment for your device in the device provisioning service.
180+
---
191181

192182
> [!TIP]
193183
> If you don't want to use the TPM2 software tools to retrieve the information, you need to find another way to obtain the provisioning information. The endorsement key, which is unique to each TPM chip, is obtained from the TPM chip manufacturer associated with it. You can derive a unique registration ID for your TPM device. For example, you can create an SHA-256 hash of the endorsement key.

0 commit comments

Comments
 (0)