I tried to move my ssh and vault AppVMs based on a (default) Debian 11 template to minimal Debian templates. My setup is based on split-ssh (Forum thread) .
Naming:
- vault : previous (default) vault based on the standard Debian template
- ssh : new ssh AppVM based on deb-11-m-ssh
- deb-11-m-ssh : new minimal Debian 11 template for ssh (only)
- secrets : new “vault” AppVM based on deb-11-m-secrets
- deb-11-m-secrets : new minimal Debian 11 template for secrets (only)
Checks I did:
In the ssh terminal, checking the agent identities with:
ssh-add -L
works fine with interconnection to vault - returns my ssh key.
In the ssh terminal, checking the agent identities with:
ssh-add -L
does not work with interconnection to secrets - returns error fetching identities: communication with agent failed.
Therefore, I do expect a missing installation or configuration in either the secrets AppVM or in the deb-11-m-secrets template.
What I did:
Configuration in dom0:
- in /etc/qubes-rpc/policy/qubes.SshAgent
@anyvm @anyvm ask
Installed packages in deb-11-m-secrets:
- qubes-core-agent-networking
- gnupg
- policykit-1
- libblockdev-crypto2
- ssh
- ssh-askpass-gnome
Configuration in deb-11-m-secrets:
user@deb-11-m-secrets:~$ sudo gedit /etc/qubes-rpc/qubes.SshAgent
#!/bin/sh
# Qubes App Split SSH Script
# safeguard - Qubes notification bubble for each ssh request
notify-send "[$(qubesdb-read /name)] SSH agent access from: $QREXEC_REMOTE_DOMAIN"
# SSH connection
socat - "UNIX-CONNECT:$SSH_AUTH_SOCK"
user@deb-11-m-secrets:~$ sudo chmod +x /etc/qubes-rpc/qubes.SshAgent
Configuration in ssh:
user@ssh:~$ sudo gedit /rw/config/rc.local
added to file:
# SPLIT SSH CONFIGURATION >>>
# replace "vault" with your AppVM name which stores the ssh private key(s)
SSH_VAULT_VM="secrets"
if [ "$SSH_VAULT_VM" != "" ]; then
export SSH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
rm -f "$SSH_SOCK"
sudo -u user /bin/sh -c "umask 177 && exec socat 'UNIX-LISTEN:$SSH_SOCK,fork' 'EXEC:qrexec-client-vm $SSH_VAULT_VM qubes.SshAgent'" &
fi
# <<< SPLIT SSH CONFIGURATION
and in
user@ssh:~$ gedit ~/.bashrc
added
# SPLIT SSH CONFIGURATION >>>
# replace "vault" with your AppVM name which stores the ssh private key(s)
SSH_VAULT_VM="secrets"
if [ "$SSH_VAULT_VM" != "" ]; then
export SSH_AUTH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
fi
# <<< SPLIT SSH CONFIGURATION
followed by the KeePassXC configuration. Got graphical feedback with KeePassXC UI “SSH Agent connection is working!” and the pre-test also returns correctly my ssh key (within the secrets AppVM).
Consequently, my guess is that I am missing a package in my deb-11-m-ssh template. What do you think? Any further test I can do?