-
-
Save ovc/c995092bd03d0539dba4fff196c1ade0 to your computer and use it in GitHub Desktop.
Revisions
-
h4de5 renamed this gist
Nov 30, 2017 . 1 changed file with 12 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,24 +1,33 @@ # prepare on windows cmd see: https://github.com/benpye/wsl-ssh-pageant ```shell mkdir workspace cd workspace git clone [email protected]:benpye/wsl-ssh-pageant.git cd wsl-ssh-pageant C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /out:wsl-ssh-pageant.exe Program.cs ``` # prepare bash on wsl ```shell sudo apt install socat ``` # add to .bashrc ```shell vi ~/.bashrc if [ -f $HOME/wsl-ssh-pageant.sh ]; then . $HOME/wsl-ssh-pageant.sh fi ``` # create wsl-ssh-pageant.sh file ```shell vi ~/wsl-ssh-pageant.sh ``` ```shell #!/bin/bash # set home directory: win_user_dir=$USER @@ -29,3 +38,4 @@ if [ $? != 0 ] ; then fi socat UNIX-LISTEN:/tmp/wsl-ssh-pageant.socket,unlink-close,unlink-early,fork TCP4:127.0.0.1:13000 & export SSH_AUTH_SOCK=/tmp/wsl-ssh-pageant.socket ``` -
h4de5 created this gist
Nov 30, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ # prepare on windows cmd # see: https://github.com/benpye/wsl-ssh-pageant mkdir workspace cd workspace git clone [email protected]:benpye/wsl-ssh-pageant.git cd wsl-ssh-pageant C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /out:wsl-ssh-pageant.exe Program.cs # prepare bash on wsl #mv /mnt/c/Users/$win_user_dir/workspace/wsl-ssh-pageant/wsl-ssh-pageant.exe ~/ sudo apt install socat # add to .bashrc vi ~/.bashrc if [ -f $HOME/wsl-ssh-pageant.sh ]; then . $HOME/wsl-ssh-pageant.sh fi # create wsl-ssh-pageant.sh file vi ~/wsl-ssh-pageant.sh #!/bin/bash # set home directory: win_user_dir=$USER # check if wsl-ssh-pageant is already running pgrep -l wsl-ssh-pageant if [ $? != 0 ] ; then /mnt/c/Users/$win_user_dir/workspace/wsl-ssh-pageant/wsl-ssh-pageant.exe & fi socat UNIX-LISTEN:/tmp/wsl-ssh-pageant.socket,unlink-close,unlink-early,fork TCP4:127.0.0.1:13000 & export SSH_AUTH_SOCK=/tmp/wsl-ssh-pageant.socket