# 5. Configuring the OpenSSH server

To enable the OpenSSH server (`sshd`) to retrieve users' public keys for authentication, you will need to modify the OpenSSH server configuration file (`sshd_config`). To do this, use your favorite text editor and add the following lines to the bottom of the `/etc/ssh/sshd_config` file.

`AuthorizedKeysCommand /opt/k9/bin/k9-ssh --user=%u`

`AuthorizedKeysCommandUser key9`

Once you have completed editing the file,  restart the OpenSSH service:

`systemctl restart ssh`


---

# 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.k9.io/key9-identity/ssh/installation-and-setup/key9-ssh-for-debian-12-bookworm-howto/5.-configuring-the-openssh-server.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.
