Skip to content

Instantly share code, notes, and snippets.

@sivinnguyen
Created July 10, 2020 18:03
Show Gist options
  • Save sivinnguyen/802165695c13c080e4ca5eecdea68caf to your computer and use it in GitHub Desktop.
Save sivinnguyen/802165695c13c080e4ca5eecdea68caf to your computer and use it in GitHub Desktop.
Generating a new SSH key and adding it to the ssh-agent

Generating a new SSH key

This creates a new ssh key, using the provided email as a comment(label). Ex: ssh-rsa AAA....== this_is_a_comment (email/hostname/etc.)

> ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Copy public key to clipboard (more)

> cmd /c "clip < ~/.ssh/id_rsa.pub"

Adding your SSH key to the ssh-agent

Check the service is running or not.

> Get-Service ssh-agent

Set the service to start manually (run powershell as administrator) and start.

> Get-Service -Name ssh-agent | Set-Service -StartupType Manual
> Start-Service ssh-agent # or just ssh-agent.exe

Ref at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment