NEW: ssh store password instructions

This commit is contained in:
Jean-Claude 2022-10-28 21:31:02 +02:00
parent f15ac497f9
commit e38ab6d07b
Signed by: jeanclaude
GPG Key ID: 8A300F57CBB9F63E
1 changed files with 23 additions and 0 deletions

23
ssh.md Normal file
View File

@ -0,0 +1,23 @@
# SSH
## Store Key Password
- Create systemd service:
```
[Unit]
Description=SSH key agent
[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
Environment=DISPLAY=:0
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
[Install]
WantedBy=default.target
```
- Set environment variables
```
unset SSH_AGENT_PID
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
```
- Make SSH add used keys automatically by adding `AddKeysToAgent yes` to `~/.ssh/config`