Timeline for WSL2 Ubuntu: How to start ssh-agent and add ssh key automatically on each terminal start up
Current License: CC BY-SA 4.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 19 at 18:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Apr 16 at 11:10 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Dec 16, 2024 at 6:07 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Aug 10, 2024 at 17:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Apr 2, 2024 at 15:04 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Feb 4, 2024 at 19:48 | comment | added | Douglas Silva | Similar question with multiple answers: superuser.com/questions/1808572/… | |
| Dec 2, 2023 at 14:02 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Aug 3, 2023 at 16:07 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| May 12, 2023 at 23:02 | comment | added | NotTheDr01ds |
Did you make any progress on this? Are you running WSL with Systemd or without? Also, is there any difference if you start with wsl ~ -e bash --norc --noprofile and then run the commands manually?
|
|
| Mar 23, 2023 at 0:04 | comment | added | Nik Shafiq Sirhan |
Just to clarify, do you mean to make these changes?: ` if [ -z "$SSH_AUTH_SOCK" ]; then #start ssh-agent ssh-agent -s > ~/.sshconnection fi . ~/.sshconnection` I've tested this one and it gives the same stdout as my previous entry, but still did not add my identity to the session.
|
|
| Mar 22, 2023 at 7:30 | answer | added | exore | timeline score: 0 | |
| Mar 22, 2023 at 6:19 | comment | added | Edgar Magallon |
Try using inside your if [ -z "$SSH_AUTH_SOCK" ] this: ssh-agent -s > ~/.sshconnection and in the ~/.bashrc file (after the first if statement) use: . ~/.sshconnection or source ~/.sshconnection
|
|
| S Mar 22, 2023 at 5:51 | review | First questions | |||
| Mar 25, 2023 at 14:04 | |||||
| S Mar 22, 2023 at 5:51 | history | asked | Nik Shafiq Sirhan | CC BY-SA 4.0 |