# How to Generate and Add Public Keys in ACC?

SSH (Secure Shell) serves as a secure means for computers to communicate with each other. It establishes a protected connection over the internet, encrypting the data exchanged between your computer and another computer, ensuring its confidentiality.

In the realm of public-key cryptography, data encryption and decryption are facilitated using a key pair. One of the keys, known as the public key, is shared with others to encrypt data. The other key, the private key, is kept confidential and solely utilized by the owner to decrypt the data. This cryptographic approach ensures secure and private communication between parties involved.

## <mark style="color:red;">Generate Public Key​</mark> <a href="#generate-public-key" id="generate-public-key"></a>

To generate a new RSA key pair, follow these steps:

{% stepper %}
{% step %}
Open a terminal or command prompt and run the following command:

`ssh-keygen -o -t rsa -C "[your@email.com](mailto:your@email.com)"`

{% hint style="info" %}
In case the command gives errors, delete the‘**-o**’ option and try running it again.
{% endhint %}
{% endstep %}

{% step %}
During the installation process, the location where the key is to be inserted needs to be selected. The default value can be accepted by pressing the **Enter** key.

**Enter file in which to save the key (/Users/username/.ssh/id\_rsa):**
{% endstep %}

{% step %}
In the next step, users have the option to assign a password to their key. If they prefer not to set a password, they can press **Enter** key to skip this step.

**Enter passphrase (empty for no passphrase):**

**Enter same passphrase again:**
{% endstep %}

{% step %}
After configuring the key, the subsequent screen will appear:

* Identification has been saved in `/Users/username/.ssh/id_rsa.`
* Public key has been saved in `/Users/username/.ssh/id_rsa.pub.`

**The key fingerprint is:**

`01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your@email.com`

**The key's randomart image is:**

```
+--[ RSA 2048]----+
|                 |
|                 |
|        . E +    |
|       . o = .   |
|      . S =   o  |
|       o.O . o   |
|       o .+ .    |
|      . o+..     |
|       .+=o      |
+-----------------+
```

{% endstep %}

{% step %}
To view the public key, run the following command:

`$ cat ~/.ssh/id_rsa.pub`
{% endstep %}

{% step %}
Copy the output of the command. The output should look like this:

```
ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAQEA879BJGYlPTLIuc9/R5MYiN4yc/YiCLcdBpSdzgK9Dt0Bkfe3rSz5cPm4wmehdE7GkVFXrBJ2YHqPLuM1yx1AUxIebpwlIl9f/aUHOts9eVnVh4NztPy0iSU/Sv0b2ODQQvcy2vYcasdasdxJjAgfWsO3W4iGEe6QwBpVomcME8IU35v5VbylM9ORQa6wvZMVrPECBvwItTY8cPWH3MGZiK/74eHbSLKA4PY3gM4GHI450Nie16yggEg2aTQfWA1rry9JYWEoHS9pJ1dnLqZU3k/8OWgqJrilwSoC5rGjgp93iu0H8T6+mEHGRQe84Nk1y5lESSWIbn6P636Bl3uQ== your@email.com
```

{% endstep %}
{% endstepper %}

## <mark style="color:red;">Add Public Key​</mark> <a href="#add-public-key" id="add-public-key"></a>

To modify the code commit repository associated with the application in the Akinon ecosystem, users need to add a public key. The responsibility of overseeing this process lies with the developer. It is important to note that up to five public keys can be added for enhanced security and access control.

To add a public key to the ACC account, log in to the account and navigate to the **Settings** section from the left-side menu. Then, click on **Public Keys** to manage and configure the public key settings.

<figure><img src="/files/P9UQbTBt0M7Kv2g87406" alt=""><figcaption></figcaption></figure>

To add a new public key, click on the **+New Public Key** button.

<figure><img src="/files/J4SRORoY4nr179MFFwPD" alt=""><figcaption></figcaption></figure>

Enter a label for the public key in the **Label** field, and paste the generated SSH Key into the **Public Key** field. Afterward, click the **Apply** button to successfully add the public key to the account.

<figure><img src="/files/q40mBk7ibLKapgfL9d2P" alt=""><figcaption></figcaption></figure>

The **Public Keys** list will display the public key that users have added. If they wish to remove a public key, they can click on the delete icon next to the respective key.

<figure><img src="/files/feqHBdmHVnH2hHDhgm4h" alt=""><figcaption></figcaption></figure>


---

# 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://docs.akinon.com/tutorials/acc/how-to-generate-and-add-public-keys-in-acc.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.
