> For the complete documentation index, see [llms.txt](https://docs.k9.io/key9-identity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.k9.io/key9-identity/ssh/installation-and-setup/key9-ssh-for-debian-12-bookworm-howto/5.-configuring-the-openssh-server.md).

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