0

I am using Windows 10's (1909) "OpenSSH Authentication Agent" (net start ssh-agent). I add keys using ssh-add.exe, but I am wondering why these keys are still active immediately after rebooting my machine:

C:\> ssh-add -l
2048 SHA256:... bersbers (RSA)

I have tried using the -t parameter to limit at least the time, but then I get a communication with agent failed error, while adding the works fine without -t:

C:\>ssh-add -t 24h bersbers.openssh
Enter passphrase for bersbers.openssh:
Could not add identity "bersbers.openssh": communication with agent failed

C:\>ssh-add bersbers.openssh
Enter passphrase for bersbers.openssh:
Identity added: bersbers.openssh (bersbers)

This is the SSH version that I am using:

C:\>ssh -V
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
1

I begin to think this is not possible. Well-hidden in the Win32-OpenSSH wiki, I found this:

ssh-agent only supports '-l' '-L' 'd' and '-D' options. It ignores '-c' and '-t' options of ssh-add. It persistently and permanently stores the user's private key.

https://github.com/PowerShell/Win32-OpenSSH/wiki/Various-Considerations

And both limitations are discussed as issues here:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.