Latest revision |
Your text |
Line 724: |
Line 724: |
|
| |
|
|
| |
|
| == WSL (Windows Subsystem for Linux) ==
| |
| * ! WIP !
| |
| Getting SSH to work in WSL.
| |
| https://github.com/drduh/YubiKey-Guide#using-multiple-keys
| |
| https://github.com/vuori/weasel-pageant
| |
| * Download and extract weasel-pagent to somewhere convenient on the windows side.
| |
| https://github.com/vuori/weasel-pageant/releases
| |
| Place this line in your .bashrc file
| |
| <syntaxhighlight lang="bash">$ nano ~./bashrc</syntaxhighlight>
| |
| <syntaxhighlight lang="bash">
| |
| # Make GNUPG / GPG work with windows smartcards weasel-pageant
| |
| eval $(<location where you unpacked the zip>/weasel-pageant -rb -a $HOME/.weasel-pageant.sock)
| |
| </syntaxhighlight>
| |
| Reload the config from the updated file:
| |
| <syntaxhighlight lang="bash">$ source ~/.bashrc</syntaxhighlight>
| |
| Add entry to the ~/.ssh/config file:
| |
| <syntaxhighlight lang="bash">nano ~/.ssh/config</syntaxhighlight>
| |
| <syntaxhighlight lang="bash">
| |
| ForwardAgent yes
| |
| RemoteForward /root/.gnupg/S.gpg-agent.ssh $HOME/.weasel-pageant.sock
| |
| </syntaxhighlight>
| |
| <syntaxhighlight lang="bash">$ chmod 600 ~/.ssh/config ; chown $USER ~/.ssh/config # Ensure you have the correct owner and permissions for the config file.</syntaxhighlight>
| |
| Test if it works:
| |
| <syntaxhighlight lang="bash">$ ssh-add -l</syntaxhighlight>
| |
| If it is working it will show your key in the list it gives.
| |
|
| |
| if you get the erro :
| |
| chmod 600 ~/.ssh/config
| |
| === Automating on Windows === | | === Automating on Windows === |
| Save the following script to a .bat file. (e.g. `C:\scripts\gpg_refresh.bat`) | | Save the following script to a .bat file. (e.g. `C:\scripts\gpg_refresh.bat`) |
Line 799: |
Line 771: |
| https://www.howtogeek.com/tips/how-to-run-a-scheduled-task-without-a-command-window-appearing/ | | https://www.howtogeek.com/tips/how-to-run-a-scheduled-task-without-a-command-window-appearing/ |
|
| |
|
| == Troubleshooting ==
| |
| To kill running background GPG:
| |
| <syntaxhighlight lang="cmd">
| |
| gpg-connect-agent killagent /bye # Kill GPG.
| |
| </syntaxhighlight>
| |
|
| |
| To start background GPG:
| |
| <syntaxhighlight lang="cmd">
| |
| gpg-connect-agent /bye # Start GPG.
| |
| </syntaxhighlight>
| |
|
| |
| To inspect connected card(s?):
| |
| <syntaxhighlight lang="cmd">
| |
| gpg --card-status # Inspect smartcard.
| |
| </syntaxhighlight>
| |
|
| |
|
| == Sources == | | == Sources == |