• Uncategorized

About linux : How-do-you-avoid-typing-the-password-of-your-ssh-key-each-time-on-Linux-and-Windows-with-OpenSSH-closed

Question Detail

I use a password-protected ssh key (RSA). That means that I need to type the password to decipher the key before using it.

I noticed that on some computers, I don’t need to type the pass of my ssh key each time I need to use it.

On my Windows computer, as well as some Linux servers, I need to do it.

I use OpenSSH on Windows (not Putty), so it is the same key as Linux. Stored in the /.shh directory.

Having a password-protected key is good in case someone steals it. But typing the password each time is annoying.

Is there a way to have my computers, on Windows and Linux, remember it?

I use it from the shell (default Ubuntu terminal and PowerShell, often from VS Code).


I tried this, but no success:

(base) PS C:\code> ssh-add -k C:\Users\user\.ssh\id_rsa  
Enter passphrase for C:\Users\user\.ssh\id_rsa: 
Identity added: C:\Users\user\.ssh\id_rsa (C:\Users\user\.ssh\id_rsa)
(base) PS C:\code> git fetch
Enter passphrase for key '/c/Users/user/.ssh/id_rsa': 

Question Answer

ssh-agent is the process that keeps your passphrase after the initial unlocking, so you don’t need to type it every time

Linux Basic Tutorial on ssh-agent

Windows SSH documentation

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.