fix(SSH): Use SSH_AUTH_SOCK in once-connected

This commit is contained in:
Michel 2024-10-28 16:48:23 +01:00
parent ab2c8a7400
commit 8465b579bf

View File

@ -23,9 +23,8 @@ touch $LOG
if [[ -n "$SSH_VAULT_VM" ]]; then if [[ -n "$SSH_VAULT_VM" ]]; then
{ {
umask u=rw,go= umask u=rw,go=
SSH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM" rm -f "${SSH_AUTH_SOCK}"
rm -f "$SSH_SOCK" socat "UNIX-LISTEN:${SSH_AUTH_SOCK},fork" "EXEC:qrexec-client-vm ${SSH_VAULT_VM} qubes.SshAgent"
socat "UNIX-LISTEN:$SSH_SOCK,fork" "EXEC:qrexec-client-vm $SSH_VAULT_VM qubes.SshAgent"
} &! } &!
fi fi