How to setup SSH on Windows Powershell for github
(Steps 2 to 5 might need to be done as admin)
- Generate SSH key by typing
ssh-keygen -t ed25519 -C "your_email"
- Start your SSH client server by typing
- To check the status of your SSH-AGENT and make sure it’s installed, type
Get-Service ssh-agentThe status will either say running or stopped.
- If it says stopped, you need to start it by typing
- You can set your SSH-AGENT and SSH-CLIENT Server to start automatically by typing these 2 commands. To automatically startup SSH-CLIENT Server
Set-Service -Name sshd -StartupType ‘Automatic’and to automatically start SSH-AGENT type
Get-Service ssh-agent | Set-Service -StartupType Manual
- If running both or either of the commands above returns error, you can set it up to start automatically using the GUI. First, type in “Services” in windows search box. Second, look for “OpenSSH (Server and Agent)” Click on both of them and change the startup type to automatic.
- Add the private SSH key to windows powershell by typing (from the home (~) directory)
After setting up SSH for github, you need to add your email address and username to the terminal so that you can push git changes back to remote as yourself.
Follow these instructions to add email and username to terminal for github.
Leave a Comment