All Projects → BlackReloaded → Wsl2 Ssh Pageant

BlackReloaded / Wsl2 Ssh Pageant

Licence: mit
bridge between windows pageant and wsl2

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Wsl2 Ssh Pageant

KeyManager
Android application to manage SSH and GPG keys on GitHub written in Kotlin.
Stars: ✭ 15 (-90.32%)
Mutual labels:  ssh, gpg
Yubikey Guide
Guide to using YubiKey for GPG and SSH
Stars: ✭ 6,709 (+4228.39%)
Mutual labels:  ssh, gpg
Yubikey
YubiKey at Datadog
Stars: ✭ 393 (+153.55%)
Mutual labels:  ssh, gpg
Trezor Agent
Hardware-based SSH/PGP agent
Stars: ✭ 400 (+158.06%)
Mutual labels:  ssh, gpg
Ssh Agent Helper
Use SSH keys from CMD, PowerShell, etc. on Windows
Stars: ✭ 31 (-80%)
Mutual labels:  hacktoberfest, ssh
piv-agent
An SSH and GPG agent which you can use with your PIV hardware security device (e.g. a Yubikey).
Stars: ✭ 31 (-80%)
Mutual labels:  ssh, gpg
Gopass
The slightly more awesome standard unix password manager for teams
Stars: ✭ 4,373 (+2721.29%)
Mutual labels:  hacktoberfest, gpg
Yubikey Touch Detector
A tool to detect when your YubiKey is waiting for a touch (to send notification or display a visual indicator on the screen)
Stars: ✭ 167 (+7.74%)
Mutual labels:  ssh, gpg
Goph
🤘 The native golang ssh client to execute your commands over ssh connection. 🚀🚀
Stars: ✭ 734 (+373.55%)
Mutual labels:  hacktoberfest, ssh
Action Tmate
Debug your GitHub Actions via SSH by using tmate to get access to the runner system itself.
Stars: ✭ 713 (+360%)
Mutual labels:  hacktoberfest, ssh
Shellhub
💻 ShellHub enables teams to easily access any Linux device behind firewall and NAT.
Stars: ✭ 686 (+342.58%)
Mutual labels:  hacktoberfest, ssh
Wsend Gpg
Encrypted end to end file transfer
Stars: ✭ 97 (-37.42%)
Mutual labels:  hacktoberfest, gpg
Monday
⚡️ A dev tool for microservice developers to run local applications and/or forward others from/to Kubernetes SSH or TCP
Stars: ✭ 1,246 (+703.87%)
Mutual labels:  hacktoberfest, ssh
Mole
CLI application to create ssh tunnels focused on resiliency and user experience.
Stars: ✭ 1,520 (+880.65%)
Mutual labels:  hacktoberfest, ssh
Paramiko Expect
A Python expect-like extension for the Paramiko SSH library which also supports tailing logs.
Stars: ✭ 154 (-0.65%)
Mutual labels:  ssh
Adonisjs.com
🕸 Source Code of the website adonisjs.com
Stars: ✭ 155 (+0%)
Mutual labels:  hacktoberfest
Sshfs Gui
SSHFS GUI Wrapper for Mac OS X
Stars: ✭ 154 (-0.65%)
Mutual labels:  ssh
Mifos Mobile
Repository for the Mifos Mobile Banking App for clients
Stars: ✭ 154 (-0.65%)
Mutual labels:  hacktoberfest
Docs
The October CMS Documentation
Stars: ✭ 155 (+0%)
Mutual labels:  hacktoberfest
Layercache
Caching made simple for Android and Java.
Stars: ✭ 155 (+0%)
Mutual labels:  hacktoberfest

wsl2-ssh-pageant

Motivation

I use a Yubikey to store a GPG key pair and I like to use this key pair as my SSH key too. GPG on Windows exposes a Pageant style SSH agent and I wanted a way to use this key within WSL2.

How to use with WSL2

Prerequisite

In order to use wsl-ssh-pageant you must have installed socat and ss on your machine. For e.g. on Ubuntu you can install these by: sudo apt install socat iproute.

Installation

  1. Download latest version from release page and copy wsl2-ssh-pageant.exe to your $HOME/.ssh directory
  2. Set the executable bit on wsl2-ssh-pageant.exe: chmod +x $HOME/.ssh/wsl2-ssh-pageant.exe
  3. Add one of the following to your shell configuration (for e.g. .bashrc, .zshrc or config.fish). For advanced configurations consult the documentation of your shell.

Bash/Zsh

SSH:

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

GPG:

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

Fish

SSH:

set -x SSH_AUTH_SOCK $HOME/.ssh/agent.sock
ss -a | grep -q $SSH_AUTH_SOCK
if [ $status != 0 ]
  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 &
end

GPG:

set -x GPG_AGENT_SOCK $HOME/.gnupg/S.gpg-agent
ss -a | grep -q $GPG_AGENT_SOCK
if [ $status != 0 ]
  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 &
end

Troubleshooting

Smartcard is detected in Windows and WSL, but ssh-add -L returns error

If this is the first time you using yubikey with windows with gpg4win, please follow the instructions in the link https://developers.yubico.com/PGP/SSH_authentication/Windows.html

| Make sure ssh support is enabled in the gpg-agent.conf and restart gpg-agent with the following command

gpg-connect-agent killagent /bye
gpg-connect-agent /bye

Credit

Some of the code is copied from benpye's wsl-ssh-pageant. This code shows how to communicate to pageant.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].