Add ssh-agent to Arch/KDE for KeepassXC

Title: Setting up SSH Agent Integration with KeePassXC on Arch, EndeavourOS, Manjaro, etc… with KDE Plasma Desktop

Introduction:

This article will guide you through setting up SSH Agent integration with KeePassXC onan Arch-based distro using the KDE Plasma Desktop environment. By following these steps, you will enable KeePassXC to detect and use the SSH agent, simplifying the management of your SSH keys.

Prerequisites:

  • Arch-Based Linux Distro with KDE Plasma Desktop installed
  • KeePassXC installed
  • A basic understanding of terminal usage

Step-by-step guide:

  1. Install OpenSSH

Make sure OpenSSH is installed on your system:

Terminal
sudo pacman -S openssh
  1. Configure the SSH Agent

We will configure the SSH agent to start automatically and set the SSH_AUTH_SOCK environment variable for the X session.

Edit or create the file ~/.xprofile using a text editor:

Terminal
nano ~/.xprofile

Add the following lines to the file to start ssh-agent and set the SSH_AUTH_SOCK variable:

.xprofile
if [ -z "$SSH_AUTH_SOCK" ]; then
  eval "$(ssh-agent -s)"
  export SSH_AUTH_SOCK
fi

Save the file and exit the text editor.

  1. Restart your computer or log out and log back in to apply the changes.
  2. Configure KeePassXC SSH Agent Integration

Open KeePassXC, go to Tools > Settings, and click on the “SSH Agent” tab. Ensure that “Enable SSH Agent integration” is checked. Configure any additional settings as needed, and then click “OK” to save the changes.


With this configuration, KeePassXC should now be able to detect the SSH agent when launched from the desktop environment. This setup allows you to manage your SSH keys more efficiently and securely using KeePassXC.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *