Windows: Using Windows native open ssh client with PuTTY agent

Hi,

newer versions of the PuTTY-CAC agent can act as ssh agent for the native Windows OpenSSH ssh client.

Putty and the native client uses the same methode (named pipes) to access am agent but the native client does not know the pipes name.

This can be done by starting the putty agent with the parameter –openssh-config

D:\> D:\PuTTY-CAC\pageant.exe --openssh-config C:\Users\michael\.ssh\pageant.conf

After starting the agent the file contains one line, the the name of the named pipe

D:\> type C:\Users\michael\.ssh\pageant.conf
IdentityAgent \\.\pipe\pageant.michael.ce788540325667453c5ec471d605345621409bee6126fa4f63e389d864559b5

This file can be included in the native openssh config. Create a file %USERPROFILE%\.ssh\config in your profile folder and add the directive

include C:\Users\michael\.ssh\pageant.conf

or if pageant.conf is in the same directory as .ssh\config

include pageant.conf

Then load an ssh key and connect

PS D:\> ssh root@10.10.10.220
 ____            _          _   _  _   ____
|  _ \ ___   ___| | ___ __ (_) | || | | __ )
| |_) / _ \ / __| |/ / '_ \| | | || |_|  _ \
|  _ < (_) | (__|   <| |_) | | |__   _| |_) |
|_| \_\___/ \___|_|\_\ .__/|_|    |_| |____/
                     |_|
Welcome to Armbian 20.11 Bionic with Linux 5.9.11-rockchip64

System load:   2%               Up time:       87 days 5:21
Memory usage:  50% of 3.71G     Zram usage:    12% of 1.85G     IP:            10.10.10.220
CPU temp:      39°C             Usage of /:    42% of 29G

Michael

Leave a Reply Cancel reply