# Setting Up SSH Key Authentication in WhaleDeck: A Complete Guide

## Generate SSH Key

The first step is to generate a compatible SSH key. WhaleDeck supports ED25519 in OPENSSH and RSA keys in OPENSSH and PEM format.

### MacOS & Linux

Run the following command in your Terminal and enter your filename and optional passphrase:

```bash
ssh-keygen -t ed25519
```

In the following example, I generate a key pair named *WhaleDeck\_Key* without a passphrase. The folder, in which I ran the command, contains now two files named `WhaleDeck_Key` & `WhaleDeck_Key.pub`*.*

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

The folder, in which you ran the command, contains now two files named WhaleDeck\_Key & *WhaleDeck\_Key.pub.*

<figure><img src="/files/97B68iF8qICxpVTqk6QH" alt=""><figcaption></figcaption></figure>

## Deploy SSH Key

You now need to deploy the generated public key on your server. For that, you need to add the content of your `.pub` file to your  user's `authorized_keys`.

This can usually be done by running the following command on your server:

```bash
echo 'YOUR PUBLIC KEY CONTENT' >> ~/.ssh/authorized_keys
```

The last step is to restart your SSH server. This either can be archived by restarting your entire server or only your SSH server. DDependingon your used operating system and SSH server, one of the following commands should do the job.

```bash
service sshd restart
service ssh restart
sudo systemctl restart sshd
```

## Use SSH Key

Finally, add the SSH key to your server in WhaleDeck. For that, add the content of your private key (the one without .pub) to the key-section and enter your passphrase in the password field if you set one during the creation process.

<figure><img src="/files/S42GN0aW0OykXvcMXqRO" 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.whaledeck.app/apple/setup/setting-up-ssh-key-authentication-in-whaledeck-a-complete-guide.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.
