add qubes ssh setup

This commit is contained in:
Lance Vick 2024-12-20 17:06:02 -08:00
parent b4662a2a9a
commit 838ac9015c
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,10 @@
[Unit]
Description=Run a SSH proxy socket to another QubesOS VM
[Service]
Environment=SSH_VAULT_VM=vault
ExecStart=%h/.local/bin/qubes-ssh-socket
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
export SSH_VAULT_VM="${SSH_VAULT_VM:-vault}"
export SSH_AUTH_SOCK="/home/${USER}/.SSH_AGENT_${SSH_VAULT_VM}"
rm -f "$SSH_AUTH_SOCK"
umask 177
socat \
"UNIX-LISTEN:${SSH_AUTH_SOCK},fork" \
"EXEC:qrexec-client-vm ${SSH_VAULT_VM} qubes.SshAgent"