SSH Agent
What is ssh-agent?
Section titled “What is ssh-agent?”ssh-agent is a helper to manage ssh keys and their passphrases, it is commonly used when you have created password-protected ssh keys (and for me in combination with git), in order to not have to type it in every time you commit or pull.
On Windows (11)
Section titled “On Windows (11)”(provided you already have created a key)
- enable the service
Terminal window Get-Service ssh-agent | Set-Service -StartupType Automatic -PassThru | Start-Service - manually start the service the first time (or reboot)
Terminal window start-ssh-agent.cmd - add private key to ssh agent
Terminal window ssh-add ~/.ssh/id_ed25519 - make sure that git uses the system ssh instead of the bundled one
Terminal window git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe - (optional): test the ssh connection (this will also prompt for host key verification)
ssh -T [email protected]ssh -T [email protected]
On Linux
Section titled “On Linux”- start the ssh-agent
Terminal window eval $(ssh-agent) - add the keys
Terminal window ssh-add ~/.ssh/id_ed25519 - from now on, you can use your key without having to type in the password each time
Fedora GNOME
Section titled “Fedora GNOME”you don’t need to set it up manually, just enter it and remember you can remember it when entering it (e.g. when using vscode to pull changes)
https://superuser.com/a/1158050
~/.ssh/config and enable the UseKeychain option:
Host * UseKeychain yesthen, you can enter it once more and it will be remembered
this is already in chezmoi
- double check that your ssh password is in keychain here: https://superuser.com/a/1140285