fix(qubes): Split SSH
This commit is contained in:
parent
b836555422
commit
02f33b0e7f
6
.zshrc
6
.zshrc
@ -350,11 +350,7 @@ bindkey -M viins '\en' nnn-file-widget
|
||||
|
||||
# SSH
|
||||
#
|
||||
if [[ -n "$SSH_VAULT_VM" ]]; then
|
||||
# Qubes Split SSH
|
||||
export SSH_AUTH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
|
||||
[[ -v SSH_AGENT_PID ]] && { kill $SSH_AGENT_PID; unset SSH_AGENT_PID }
|
||||
else
|
||||
if [[ -z "$SSH_VAULT_VM" ]]; then
|
||||
# KeePassXC SSH Agent
|
||||
[[ -v SSH_AUTH_SOCK ]] || export SSH_AUTH_SOCK=$(echo /tmp/ssh-*/agent.*(U))
|
||||
fi
|
||||
|
@ -18,12 +18,15 @@ 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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user