Change to new ssh-agend bridge

This commit is contained in:
Philip Henning 2020-12-29 23:11:33 +01:00
parent de95ea4138
commit a78d0d6538

View file

@ -17,7 +17,20 @@ if [ -d "$HOME/.local/bin" ] ; then
fi fi
# Connect to windows ssh pageant # Connect to windows ssh pageant
eval $(/mnt/c/weasel-pageant/weasel-pageant -rb -a $HOME/.weasel-pageant.sock) export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
ss -a | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0 ]; then
rm -f $SSH_AUTH_SOCK
(setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:$HOME/.ssh/wsl2-ssh-pageant.exe >/dev/null 2>&1 &)
fi
# Connect to windows gpg agent
export GPG_AGENT_SOCK=$HOME/.gnupg/S.gpg-agent
ss -a | grep -q $GPG_AGENT_SOCK
if [ $? -ne 0 ]; then
rm -rf $GPG_AGENT_SOCK
(setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork EXEC:"$HOME/.ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" >/dev/null 2>&1 &)
fi
# X410 (Windows X11 Server) # X410 (Windows X11 Server)
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0 export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0