IssueRaiser

ssh-agent: permanent loaded ssh-key storage

**"OpenSSH for Windows" version** 7.7.2.2 **Server OperatingSystem** Irrelevant **Client OperatingSystem** Windows 10 Home (18362.418) **The problem** I am using private SSH-keys encrypted with a passphrase. When using any SSH-agent, that means I have to provide my passphrase to be able to load the key and use it. I've used pageant before and there you load the key and provide the passphrase. Whenever pageant gets terminated (by shutdown, rebooting, ...) the key is removed from memory, and I have to provide my passphrase again the next time I want to use it. Every time, hence the security advantage of having an encrypted SSH key. With the windows openssh agent however, that's a different story. I have my agent set to automatically start with windows (I believe by running `Set-Service ssh-agent -StartupType Automatic`) just like I did with pageant. However, the windows openssh agent seems to permanently store my SSH key somewhere after loading it to the agent once (`ssh-add`), because when I run `ssh-add l` after a restart of my computer, they encrypted key which I loaded before the restart is automatically loaded again, without requiring my passphrase again. This completely voids the advantage of a passphrase-protected SSH key and to my opinion is a big security issue. **Proposed solution** Do not store my SSH key permanently when I load it into the agent, but only temporarily store it in the agent's memory. Or at least store it in it's passphrase-encrypted form and ask

Posted by mluypaert on Oct 29, 2019, 9:32 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

github (Sysadmin)

ssh-agent: permanent loaded ssh-key storage

mluypaertOct 29, 2019, 9:32 AM

**"OpenSSH for Windows" version** 7.7.2.2 **Server OperatingSystem** Irrelevant **Client OperatingSystem** Windows 10 Home (18362.418) **The problem** I am using private SSH-keys encrypted with a passphrase. When using any SSH-agent, that means I have to provide my passphrase to be able to load the key and use it. I've used pageant before and there you load the key and provide the passphrase. Whenever pageant gets terminated (by shutdown, rebooting, ...) the key is removed from memory, and I have to provide my passphrase again the next time I want to use it. Every time, hence the security advantage of having an encrypted SSH key. With the windows openssh agent however, that's a different story. I have my agent set to automatically start with windows (I believe by running `Set-Service ssh-agent -StartupType Automatic`) just like I did with pageant. However, the windows openssh agent seems to permanently store my SSH key somewhere after loading it to the agent once (`ssh-add`), because when I run `ssh-add l` after a restart of my computer, they encrypted key which I loaded before the restart is automatically loaded again, without requiring my passphrase again. This completely voids the advantage of a passphrase-protected SSH key and to my opinion is a big security issue. **Proposed solution** Do not store my SSH key permanently when I load it into the agent, but only temporarily store it in the agent's memory. Or at least store it in it's passphrase-encrypted form and ask

Comments (0)

No comments yet. Start the discussion.

Comment on this issue