A Windows SSH askpass utility with Windows Hello support, designed for use with WSL.
- GUI password prompt for SSH passphrases
- Windows Hello biometric authentication support
- Credential caching using Windows Credential Manager
- Host key verification dialogs (yes/no prompts)
- 5-minute Windows Hello session cache
- Install Rust: https://rustup.rs/
- Install cargo-xwin for cross-compilation from Linux:
cargo install cargo-xwin
- Add the Windows target:
rustup target add x86_64-pc-windows-msvc
Debug build:
cargo xwin build --target x86_64-pc-windows-msvcRelease build (optimized):
cargo xwin build --release --target x86_64-pc-windows-msvcThe output binary will be at:
- Debug:
target/x86_64-pc-windows-msvc/debug/wsl-ssh-askpass.exe - Release:
target/x86_64-pc-windows-msvc/release/wsl-ssh-askpass.exe
Set the SSH_ASKPASS environment variable in your WSL shell:
export SSH_ASKPASS="/mnt/c/path/to/wsl-ssh-askpass.exe"
export SSH_ASKPASS_REQUIRE=forceAdd these to your ~/.bashrc or ~/.zshrc for persistence.
- When SSH needs a passphrase, it calls this utility with the prompt as an argument
- The utility checks for a cached passphrase in Windows Credential Manager
- If cached and Windows Hello session is valid, returns the passphrase immediately
- If cached but Hello session expired, prompts for Windows Hello verification
- If not cached, shows a credential dialog, caches the passphrase, and returns it
- Passphrases are stored in Windows Credential Manager with the prefix
ssh-askpass: - Windows Hello timestamps use
ssh-askpass:hello-timestamp - Passphrases persist until manually deleted
- Windows Hello verification is cached for 5 minutes
MIT