Skip to content

Instantly share code, notes, and snippets.

@danieldogeanu
Last active October 29, 2025 07:52
Show Gist options
  • Save danieldogeanu/16c61e9b80345c5837b9e5045a701c99 to your computer and use it in GitHub Desktop.
Save danieldogeanu/16c61e9b80345c5837b9e5045a701c99 to your computer and use it in GitHub Desktop.

Revisions

  1. danieldogeanu revised this gist Jul 31, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MakePowerShellRememberSSHPassphrase.md
    Original file line number Diff line number Diff line change
    @@ -31,4 +31,4 @@ ssh-add $HOME/.ssh/your_file_name

    5. Done! Now restart your Powershell and even Windows if necessary.

    If this was useful, you can [buy me a coffee here](https://www.buymeacoffee.com/danieldogeanu). Thank you!
    If this was useful, you can [buy me a coffee here](https://ko-fi.com/danieldogeanu). Thank you!
  2. danieldogeanu revised this gist Apr 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MakePowerShellRememberSSHPassphrase.md
    Original file line number Diff line number Diff line change
    @@ -31,4 +31,4 @@ ssh-add $HOME/.ssh/your_file_name

    5. Done! Now restart your Powershell and even Windows if necessary.

    If this was useful to you, you can [buy me a coffee here](https://www.buymeacoffee.com/danieldogeanu)
    If this was useful, you can [buy me a coffee here](https://www.buymeacoffee.com/danieldogeanu). Thank you!
  3. danieldogeanu revised this gist Apr 22, 2021. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion MakePowerShellRememberSSHPassphrase.md
    Original file line number Diff line number Diff line change
    @@ -29,4 +29,6 @@ Host github.com
    ssh-add $HOME/.ssh/your_file_name
    ```

    5. Done! Now restart your Powershell and even Windows if necessary.
    5. Done! Now restart your Powershell and even Windows if necessary.

    If this was useful to you, you can [buy me a coffee here](https://www.buymeacoffee.com/danieldogeanu)
  4. danieldogeanu revised this gist Feb 3, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MakePowerShellRememberSSHPassphrase.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ You should not use the Open SSH client that comes with Git for Windows. Instead,
    git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
    ```

    3. Configure SSH to automatically add the keys to the agent on startup by editing the `config` file found at `$HOME\.ssh\config` (`$HOME` stands for `C:\Users\%YOUR_USERNAME%`), and add the following lines:
    3. Configure SSH to automatically add the keys to the agent on startup by editing the `config` file found at `$HOME\.ssh\config` (full path - `C:\Users\%YOUR_USERNAME%\.ssh\config`), and add the following lines:
    ```
    Host *
    AddKeysToAgent yes
  5. danieldogeanu revised this gist Feb 3, 2021. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion MakePowerShellRememberSSHPassphrase.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,10 @@ You should not use the Open SSH client that comes with Git for Windows. Instead,
    - Find the `OpenSSH Authentication Agent` in the list and double click on it;
    - In the `OpenSSH Authentication Agent Properties` window that appears, choose `Automatic` from the `Startup type:` dropdown and click `Start` from `Service status:`. Make sure it now says `Service status: Running`.

    2. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell: `git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe`;
    2. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
    ```
    git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
    ```

    3. Configure SSH to automatically add the keys to the agent on startup by editing the `config` file found at `$HOME\.ssh\config` (`$HOME` stands for `C:\Users\%YOUR_USERNAME%`), and add the following lines:
    ```
  6. danieldogeanu revised this gist Feb 3, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MakePowerShellRememberSSHPassphrase.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ You should not use the Open SSH client that comes with Git for Windows. Instead,

    2. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell: `git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe`;

    3. Configure SSH to automatically add the keys to the agent on startup by editing the `config` file found at `C:\Users\%YOUR_USERNAME%\.ssh\config`, and add the following lines:
    3. Configure SSH to automatically add the keys to the agent on startup by editing the `config` file found at `$HOME\.ssh\config` (`$HOME` stands for `C:\Users\%YOUR_USERNAME%`), and add the following lines:
    ```
    Host *
    AddKeysToAgent yes
  7. danieldogeanu revised this gist May 6, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MakePowerShellRememberSSHPassphrase.md
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ Host github.com

    4. Add your SSH key to the `ssh-agent` by issuing the `ssh-add` command and entering your passphrase:
    ```
    ssh-add C:\Users\%YOUR_USERNAME%/.ssh/your_file_name
    ssh-add $HOME/.ssh/your_file_name
    ```

    5. Done! Now restart your Powershell and even Windows if necessary.
  8. danieldogeanu revised this gist Mar 1, 2020. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions MakePowerShellRememberSSHPassphrase.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

    1. Start the `ssh-agent` from Windows Services:
    a. Type `Services` in the `Start Menu` or `Win+R` and then type `services.msc` to launch the Services window;
    b. Find the `OpenSSH Authentication Agent` in the list and double click on it;
    c. In the `OpenSSH Authentication Agent Properties` window that appears, choose `Automatic` from the `Startup type:` dropdown and click `Start` from `Service status:`. Make sure it now says `Service status: Running`.
    - Type `Services` in the `Start Menu` or `Win+R` and then type `services.msc` to launch the Services window;
    - Find the `OpenSSH Authentication Agent` in the list and double click on it;
    - In the `OpenSSH Authentication Agent Properties` window that appears, choose `Automatic` from the `Startup type:` dropdown and click `Start` from `Service status:`. Make sure it now says `Service status: Running`.

    2. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell: `git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe`;

  9. danieldogeanu created this gist Oct 3, 2019.
    29 changes: 29 additions & 0 deletions MakePowerShellRememberSSHPassphrase.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

    1. Start the `ssh-agent` from Windows Services:
    a. Type `Services` in the `Start Menu` or `Win+R` and then type `services.msc` to launch the Services window;
    b. Find the `OpenSSH Authentication Agent` in the list and double click on it;
    c. In the `OpenSSH Authentication Agent Properties` window that appears, choose `Automatic` from the `Startup type:` dropdown and click `Start` from `Service status:`. Make sure it now says `Service status: Running`.

    2. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell: `git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe`;

    3. Configure SSH to automatically add the keys to the agent on startup by editing the `config` file found at `C:\Users\%YOUR_USERNAME%\.ssh\config`, and add the following lines:
    ```
    Host *
    AddKeysToAgent yes
    IdentitiesOnly yes
    ```
    You can also add the following lines if you generated an SSH key with custom name or multiple SSH keys:
    ```
    Host github.com
    HostName github.com
    User your_user_name
    IdentityFile ~/.ssh/your_file_name
    ```

    4. Add your SSH key to the `ssh-agent` by issuing the `ssh-add` command and entering your passphrase:
    ```
    ssh-add C:\Users\%YOUR_USERNAME%/.ssh/your_file_name
    ```

    5. Done! Now restart your Powershell and even Windows if necessary.