add keys to agent on first connection
This commit is contained in:
parent
e646ba3701
commit
e6bda02aa5
1 changed files with 4 additions and 3 deletions
|
@ -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`
|
`ssh-add ~/.ssh/id_ed25519`
|
||||||
|
|
||||||
## Forward agent
|
## 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
|
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 *
|
Host *
|
||||||
ServerAliveInterval 15
|
ServerAliveInterval 15
|
||||||
|
AddKeysToAgent yes
|
||||||
ForwardAgent 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
|
## todo
|
||||||
- Add the ability to ask the key password on login
|
- Add the ability to ask the key password on login
|
||||||
- Store the SSH key between restarts (probably requires external packages)
|
- Store the SSH key between restarts (probably requires external packages)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue