User Tools

Site Tools


windows:allgemein:keepassxc_sshagent

KeepassXC SSH Agent

Möchte man seine SSH Keys im KeePassXC verwalten und diese auch noch via SSH Agent weiter geben? Dann bist du hier genau richtig!
Getestet unter Windows 11 und OpenSSH. Als Shell kommt WSL-1 mit Ubuntu 22.04 zum Einsatz.

OpenSSH Agent

Windows 10 und 11 bieten nativ einen OpenSSH Agent an. Dieser ist per default ausgeschalten.
services.msc –> OpenSSH Authentication Agent –> Startup type: Automatic

KeePassXC

SSH Agent aktivieren

KeePassXC ist am System installiert. Der SSH Agent muss noch aktiviert werden.
Tools –> Settings –> SSH Agent

  • Enable SSH Agent integration
  • Use OpenSSH

SSH Key eintragen

Anlegen eines neuen Entry

  • Password: Password vom SSH Key
  • Advanced: SSH Key als Attachment hinterlegen
  • SSH Agent:
    • Add key to agent when database is opened/unlocked
    • Remove key from agent when databas is closed/locked
  • Attachment: auswählen des Keys


KeyPassXC Agent to WSL-1

Hier eine Anleitung und auch eine kleine App die benötigt wird.
https://code.mendhak.com/wsl-keepassxc-ssh/

In der WSL-1 Shell:

vim ~/.bashrc

# Keypassxc SSHAgent to WLS
export SSH_AUTH_SOCK=/mnt/c/Users/crupprecht/ssh-agent.sock
(/mnt/c/Users/geileruser/Nextcloud/Tools/KeePass/wsl-ssh-agent-gui.exe -socket "C:\Users\geileruser\ssh-agent.sock" & disown

Die Pfade müssen sicher angepasst werden.


KeyPassXC Agent to WSL-2

Hier eine Anleitung wenn man die WSL-2 verwendet
https://code.mendhak.com/wsl2-keepassxc-ssh/

Agent Forwarding

Hat man den SSH Key auf mehreren Systemen installiert und hat einen SSH Jumphost möchte man natürlich dort auch nicht das Passwort vom Key eingeben.

Local auf der WSL Shell

vim ~/.ssh/config

ForwardAgent yes
windows/allgemein/keepassxc_sshagent.txt · Last modified: by stone