From e6bda02aa5159ea5e8873344d403381db1cd151e Mon Sep 17 00:00:00 2001 From: theadam Date: Sun, 8 Jun 2025 18:21:24 +0200 Subject: [PATCH] add keys to agent on first connection --- ssh-agent-in-wsl.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ssh-agent-in-wsl.md b/ssh-agent-in-wsl.md index 190941d..908f9ea 100755 --- a/ssh-agent-in-wsl.md +++ b/ssh-agent-in-wsl.md @@ -25,15 +25,16 @@ After every start of WSL, add the key to the SSH agent and unlock it with the pa `ssh-add ~/.ssh/id_ed25519` ## Forward agent - Usualy a good idea to forward the agent. With this if using a jump host, you do not need to reenter the password if connect from a host to another host. Add this or create the `~/.ssh/config` file ``` Host * ServerAliveInterval 15 + AddKeysToAgent yes ForwardAgent yes ``` -> ServerAlive useful, if the underlying connection closes the TCP sockets, E.G. Cisco EPC3925 or NATted cellular networks. This option sends dummy packet every 15 secs to keep the connection up. +- ServerAlive useful, if the underlying connection closes the TCP sockets, E.G. Cisco EPC3925 or NATted cellular networks. This option sends dummy packet every 15 secs to keep the connection up. +- `AddKeysToAgent` is an useful function that causes that you do not need to add your keys at boot with `ssh-add` command. Simply make the first connection, unlock the keys and enjoy it from the next login. ## todo - Add the ability to ask the key password on login -- Store the SSH key between restarts (probably requires external packages) \ No newline at end of file +- Store the SSH key between restarts (probably requires external packages)