# Generate a new set of cryptographic keys

"<mark style="color:red;">**Old machine**</mark>" is the machine that has the **original** set of cryptographic keys that were generated. "<mark style="color:orange;">**New machine**</mark>" is the device you want the new set of cryptographic keys on.

### Step 1) Generate a passcode from your <mark style="color:red;">Old machine</mark>

Choose the operating system that is running on your old machine.

{% tabs %}
{% tab title="MacOS/Linux" %}
{% hint style="warning" %}
Make sure to replace `<REPLACE_client>` with your client atSign
{% endhint %}

```
~/.local/bin/at_activate otp -a @<REPLACE_client>
```

{% endtab %}

{% tab title="Windows" %}

#### 1.1 Open the Windows installer program and click "Manage Keys"

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FVsfyXnZc8UrWqwy6uD7A%2FCleanShot%202025-01-20%20at%2017.26.37%402x.png?alt=media&#x26;token=f9fd7d12-52db-4895-a8f0-691c20e53c03" alt=""><figcaption></figcaption></figure>

#### 1.2 Enter the atSign you wish to manage and click "Next"

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FwxKdwlH6rn5OYoU1aQN1%2FCleanShot%202025-01-20%20at%2017.27.40%402x.png?alt=media&#x26;token=5122a1cc-f640-41ef-b208-11931da1ea80" alt=""><figcaption></figcaption></figure>

#### 1.3 Click "New OTP"

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FPV1FizdF5IMTHiDI5quj%2FCleanShot%202025-01-20%20at%2017.28.20%402x.png?alt=media&#x26;token=31bb93a3-4cab-42bb-998f-fd462cdd1d93" alt=""><figcaption></figcaption></figure>

#### 1.4 Wait a few seconds for the OTP to appear then proceed to Step 2 on the <mark style="color:orange;">New machine</mark>

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FuR7ToCzqm97Rv7GeBOrl%2FCleanShot%202025-01-20%20at%2017.29.22%402x.png?alt=media&#x26;token=795401d7-6bca-48df-bb79-a5a1434f4823" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Step 2) Make an authorization request on your <mark style="color:orange;">New machine</mark>

Choose the operating system that is running on your new machine.

{% tabs %}
{% tab title="Running MacOS/Linux" %}
{% hint style="warning" %}
Make sure to replace the appropriate values:\
`<REPLACE_client>` with your client atSign\
`<client_device_name>` with a unique name for the device\
`<PASSCODE>` with the passcode from **Step 1**
{% endhint %}

```
~/.local/bin/at_activate enroll -a @<REPLACE_client> \
  -s <PASSCODE> \
  -p noports \
  -k ~/.atsign/keys/@<REPLACE_client>_key.atKeys \
  -d <client_device_name> \
  -n "sshnp:rw,sshrvd:rw"
```

{% endtab %}

{% tab title="Running Windows" %}

#### 2.1 Open the Windows Installer and click "Generate Keys"

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FXBPvFu9CIdFAJ2IvhGkE%2FCleanShot%202025-01-20%20at%2017.14.52%402x.png?alt=media&#x26;token=b0390059-3051-493f-8bab-d3e2b8e84e10" alt=""><figcaption></figcaption></figure>

#### 2.2 Enter the atSign you wish to transfer and click "Next"

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FDDV3zxD7SkjDfEv86xyp%2FCleanShot%202025-01-20%20at%2017.15.11%402x.png?alt=media&#x26;token=cb9c1d19-134e-4bb5-a790-a39fe7851456" alt=""><figcaption></figcaption></figure>

#### 2.3 Enter the OTP then press "Generate"

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FzHAnr4MZkKzUIjdfqKNs%2FCleanShot%202025-01-20%20at%2017.43.42%402x.png?alt=media&#x26;token=437f6939-aa33-416c-b234-af121a786652" alt=""><figcaption></figcaption></figure>

#### 2.4 Proceed to Step 3. Once the request has been approved in Step 3, you should see this screen

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2F4zCum7kWQPnPsaGbb0EA%2FCleanShot%202025-01-20%20at%2017.44.52%402x.png?alt=media&#x26;token=a07e2ecd-9607-46da-9de9-e5fdf1b3804c" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Step 3) Approve the request on your <mark style="color:red;">Old machine</mark>

Choose the operating system that is running on your old machine.

{% tabs %}
{% tab title="MacOS/Linux" %}
{% hint style="warning" %}
Make sure to replace `<client_device_name>` with the device name from **Step 2**
{% endhint %}

```
~/.local/bin/at_activate approve -a @<REPLACE_client> \
  --arx noports \
  --drx <client_device_name>
```

{% endtab %}

{% tab title="Windows" %}
{% hint style="info" %}
If you aren't already on the "Manage Keys" screen, follow **Steps 1.1 and 1.2** above.
{% endhint %}

#### 3.1 Once step 2 is complete press refresh and the new request will appear

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FC90kRQtMmdLPALhQo9d5%2FCleanShot%202025-01-20%20at%2017.32.07%402x.png?alt=media&#x26;token=0da6a2b3-e745-414e-9165-ac4f0130993d" alt=""><figcaption></figcaption></figure>

#### 3.2 Approve or Deny the request

* If the request looks incorrect, then press "Deny" to deny it, and start the process again.
* If the request looks correct, then press "Approve" to approve it.

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FTtMs8wNy5i0vWzXyzNmF%2FCleanShot%202025-01-20%20at%2017.33.42%402x.png?alt=media&#x26;token=a2c26d8f-c83d-49fe-8424-34099d36392a" alt=""><figcaption></figcaption></figure>

#### 3.3 Once the request is approved, it should disappear from the installer, the new machine's enrollment should complete in a few seconds.

<figure><img src="https://2080310565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDhnoLkxryJhtCjj7mE2%2Fuploads%2FOO1HdikbnqOvrEcllRjS%2FCleanShot%202025-01-20%20at%2017.34.46%402x.png?alt=media&#x26;token=a8801416-eb70-47e5-ba9a-8c8b5cf917ce" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}
