> For the complete documentation index, see [llms.txt](https://docs.whaledeck.app/apple/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.whaledeck.app/apple/setup/setting-up-ssh-key-authentication-in-whaledeck-a-complete-guide.md).

# 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>
