# Linux
- install: `yubico-piv-tool`, `ykman`, `opensc`, `ykcs11`
- find path to `libykcs11.so`
```bash
sudo find \ -name libykcs11.so 2> /dev/null
```
![[images/Pasted image 20251106092403.png]]
- add below to `~/.ssh/config`
```bash
echo "PKCS11Provider /path/to/libykcs11.so" >> ~/.ssh/config
```
- confirm entry added to `~/.ssh/config`![[images/Pasted image 20251106092437.png]]
# Windows
- Download `yubico-piv-tool` here: [Releases](https://developers.yubico.com/yubico-piv-tool/Releases/)
- Run installation wizard
- In order for the `libykcs11.dll` to be found by ssh, add its folder to the Windows environment variable system path
- Navigate to Device specification > Advanced > Environment variables > System variables
- Select path, then edit
- Click new
- Add path for folder containing the `libykcs11.dll` file, by default this is `C:\Program Files\Yubico\Yubico PIV Tool\bin\`, then click OK
- NOTE: ensure this new entry is above the existing ssh entry
- Run below command in PowerShell
```powershell
New-Item -Path $env:USERPROFILE\.ssh\ -Name "config" -ItemType "file" -Value 'PKCS11Provider "C:\Program Files\Yubico\Yubico PIV Tool\bin\libykcs11.dll"'
```
- Confirm success with below:
```powershell
type $env:USERPROFILE\.ssh\config
```
![[images/Pasted image 20251106090012.png]]
- Restart PowerShell and attempt to connect with `ssh
[email protected]`
- Also try the long form ssh command below if short form does not work
```bash
ssh -v -I "C:\Program Files\Yubico\Yubico PIV Tool\bin\libykcs11.dll"
[email protected]
```