aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/wsl.zsh7
1 files changed, 5 insertions, 2 deletions
diff --git a/zsh/wsl.zsh b/zsh/wsl.zsh
index fedbda9..13da9c8 100644
--- a/zsh/wsl.zsh
+++ b/zsh/wsl.zsh
@@ -48,13 +48,16 @@ function r-cut() {
(( ${+aliases[cb]} )) && printf "$CUTBUFFER" | cb
}
+# https://github.com/benpye/wsl-ssh-pageant
+# https://github.com/drduh/YubiKey-Guide#remote-host-configuration
+# https://dev.to/dzerycz/series/11353
# SSH Socket
# Removing Linux SSH socket and replacing it by link to wsl2-ssh-pageant socket
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:$ZSH_BASE/ssh/wsl2-ssh-pageant.exe &>/dev/null &
+ (setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"$ZSH_BASE/ssh/wsl2-ssh-pageant.exe" &>/dev/null &)
fi
# GPG Socket
# Removing Linux GPG Agent socket and replacing it by link to wsl2-ssh-pageant GPG socket
@@ -62,5 +65,5 @@ 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:"$ZSH_BASE/ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" &>/dev/null &
+ (setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork EXEC:"$ZSH_BASE/ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" &>/dev/null &)
fi