This is a setup script to connec the WSL ssh-agent to your Windows ssh-agent.
This script assumes:
- Your WSL is running Ubuntu
- You have KU Leuven's CertAgent installed and set to AutoStart (right-click the tray icon and make sure AutoStart is checked)
- You have downloaded the kmk binary from ICTS and placed it in your Windows Downloads folder
- performs a software check for necessary software and advises otherwise
- asks for your r-number (or u- or b-number)
- creates ~/.ssh/config if needed
- adds host entries to ~/.ssh/config
- creates a helper command in ~/.local/bin
- adds ~/.local/bin to PATH in ~/.bashrc if needed
- downloads npiperelay to communicate with Windows CertAgent
- sets up the necessary config in ~/.bashrc to make it work
- Optionally: add windows SSH keys to agent on WSL startup. (Modify the
SSH_keys_to_add=()line in your.bashrc)
- Clone this repo inside WSL
cd
git clone https://github.com/IvS-KULeuven/WSL_scripts.git- Run the setup.sh script
cd WSL_scripts
bash setup.shThis repo also includes some other files. Those are the manual approach. setup.sh does not read these, they are included inside that script in a slightly different form for automation. If you don't trust running scripts from the internet or want to investigate yourself, feel free to inspect.
.bashrc: entries for your~/.bashrckmkcheck: placed under~/.local/binshared_ssh_agent.sh: sourced in.bashrcssh_config: entries for~/.ssh/config