# Adding SSH keys

When using a [production image](/hardware-integration/auterionos-system-guide/types-of-auterionos-images.md#production-and-development-images) where SSH root access as well as password-based login are disabled, you can add your public SSH key to Skynode using the developer tools. Please ensure that your key is well protected. The SSH key has to be added to the file `./authorized_keys` in the developer tools and Skynode has to be re-flashed afterwards with a newly built image using the developer tools.

If you do not have an SSH key yet, you can generate a 4096 bit RSA key with this command:

```bash
ssh-keygen -t rsa -b 4096
```

The following command appends your public SSH key to `authorized keys`.

```bash
cd <path_to_auterion-developer-tools>
cat ~/.ssh/id_rsa.pub >> ./authorized_keys
```

If your Skynode is running a production image, you will need to build and provision a new image for Skynode before the key can be used. Otherwise you can use the following command to add your key on your device.

```bash
make import-ssh-key
```

By default Skynode will take the SSH key from `~/.ssh/id_rsa.pub` but you can override the default path with the argument `keyPath=`.

Once the SSH keys were added, package a new AuterionOS image by using the following command for example:

{% code overflow="wrap" %}

```bash
make package-update version=my-version artifactPath=~/Download/artifact.auterionos outputArtifactPath=./output/update.auterionos
```

{% endcode %}


---

# 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.auterion.com/hardware-integration/auterion-developer-tools/adding-ssh-keys.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.
