fix(qubes): Split SSH sockets

This commit is contained in:
Michel 2024-10-18 14:41:06 +02:00
parent 02f33b0e7f
commit 6f5a1d3818
2 changed files with 11 additions and 7 deletions

View File

@ -3,6 +3,10 @@ LOG=$HOME/.xsessionrc.log
rm -f $LOG
touch $LOG
export SSH_VAULT_VM="keepassXC"
#export ALT_HISTORY_FILE=$HOME/QubesIncoming/Cloud/history
#export SSH_VAULT_VM="keepassXC"
#export SSH_AUTH_SOCK="/home/user/.SSH_AGENT_${SSH_VAULT_VM}"
# Connection to agent is done by ~/bin/once-connected.zsh
export >> $LOG

View File

@ -3,14 +3,17 @@
alias xterm='xterm -bg black -fg white -fa Hack -fs 10'
## Proof of execution
## Execution Log
#
# touch ${0}.touched
LOG=${0}.log
rm -f $LOG
touch $LOG
## Qubes: Template Cleaning
#
sudo apt clean
#sudo apt clean
## Qubes: Split SSH
@ -18,15 +21,12 @@ sudo apt clean
# https://forum.qubes-os.org/t/split-ssh/19060
#
if [[ -n "$SSH_VAULT_VM" ]]; then
[[ -v SSH_AGENT_PID ]] && kill $SSH_AGENT_PID
unset SSH_AGENT_PID
{
umask u=rw,go=
SSH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
rm -f "$SSH_SOCK"
socat "UNIX-LISTEN:$SSH_SOCK,fork" "EXEC:qrexec-client-vm $SSH_VAULT_VM qubes.SshAgent"
} &!
export SSH_AUTH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
fi