# Step 1

## Generate and Store the SSH Key

Generate an SSH Key Pair on the Old Instance:

* Run the following command on the old instance to generate an SSH key pair (if it doesn’t already exist) on the new instance.

```
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -C "your_email@example.com"
```

* Copy the SSH Public Key to the New Instance:

Use the following command to transfer the public key to the new instance.

```
ssh-copy-id -i ~/.ssh/id_rsa.pub username@new_instance_ip
```

* Remove the Public Key from the New Instance (Post-Termination of Old Node):

1. Once the old instance is terminated, remove its public key from the `authorized_keys` file on the new instance to revoke access.
2. Delete the corresponding key entry and save the file.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://supraoracles.gitbook.io/supra/network/node/node-relocation-guide/step-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
