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
|
# SSH
|
||||||
#
|
#
|
||||||
if [[ -n "$SSH_VAULT_VM" ]]; then
|
if [[ -z "$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
|
|
||||||
# KeePassXC SSH Agent
|
# KeePassXC SSH Agent
|
||||||
[[ -v SSH_AUTH_SOCK ]] || export SSH_AUTH_SOCK=$(echo /tmp/ssh-*/agent.*(U))
|
[[ -v SSH_AUTH_SOCK ]] || export SSH_AUTH_SOCK=$(echo /tmp/ssh-*/agent.*(U))
|
||||||
fi
|
fi
|
||||||
|
@ -18,12 +18,15 @@ sudo apt clean
|
|||||||
# https://forum.qubes-os.org/t/split-ssh/19060
|
# https://forum.qubes-os.org/t/split-ssh/19060
|
||||||
#
|
#
|
||||||
if [[ -n "$SSH_VAULT_VM" ]]; then
|
if [[ -n "$SSH_VAULT_VM" ]]; then
|
||||||
|
[[ -v SSH_AGENT_PID ]] && kill $SSH_AGENT_PID
|
||||||
|
unset SSH_AGENT_PID
|
||||||
{
|
{
|
||||||
umask u=rw,go=
|
umask u=rw,go=
|
||||||
SSH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
|
SSH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
|
||||||
rm -f "$SSH_SOCK"
|
rm -f "$SSH_SOCK"
|
||||||
socat "UNIX-LISTEN:$SSH_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"
|
||||||
} &!
|
} &!
|
||||||
|
export SSH_AUTH_SOCK="/home/user/.SSH_AGENT_$SSH_VAULT_VM"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user