Sharing the Microsoft SSH agent pipe with a container on Windows is not possible so we'll use Putty SSH agent pageant.exe.
Install and launch pageant.exe
Set SSH_AUTH_SOCK environment variable : $env:SSH_AUTH_SOCK="\\.\pipe\"+(get-childitem -Filter pageant* \\.\pipe\ -Name)
Add the key to the agent : ssh-add.exe C:\Users\%username%\.ssh\id_ed25519
Run the container : docker run -it --isolation=hyperv --mount type=npipe,source=$env:SSH_AUTH_SOCK,target='\\.\pipe\openssh-ssh-agent' -e SSH_AUTH_SOCK='\\.\pipe\openssh-ssh-agent' mcr.microsoft.com/windows/servercore:ltsc2025 powershell
Once inside the container, check if it works :
PS C:\> echo $env:SSH_AUTH_SOCK
\\.\pipe\openssh-ssh-agent
PS C:\> ssh-add.exe -l
[...key should appear here...]
PS C:\> git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe"
PS C:\> git clone git@github.com:org/repo.git
Cloning into 'repo'...
remote: Enumerating objects: 11178, done.
[...Git can clone using the SSH key...]
To convert this “Network Terminal” to a bridged AP requires a few steps.
Connect to the admin interface, go to “System Management”/“Upstream network port settings” and select “fixed upstream network port”.
The device will reboot once.
Reconnect to the admin interface and go to “Network configuration”/“WAN configuration”.
Remove the existing profile and create a new one with WAN mode = bridge and tick everything under “binding options”. Enter 0 as multicast VLAN ID value for both address families.
Save and reboot.