Skip to content

Instantly share code, notes, and snippets.

@TyrfingMjolnir
Forked from nrollr/SSHKeys.sh
Created October 2, 2019 06:46
Show Gist options
  • Select an option

  • Save TyrfingMjolnir/5c4e4549d0e76fc0919c24d1b450a2ea to your computer and use it in GitHub Desktop.

Select an option

Save TyrfingMjolnir/5c4e4549d0e76fc0919c24d1b450a2ea to your computer and use it in GitHub Desktop.
Generate SSH keys
#!/bin/bash/
ls -al ~/.ssh # Lists existing files in your .ssh directory
ssh-keygen -t rsa -b 4096 -C "your_email@domain.com" # Creates new ssh key, using the provided email as label
eval "$(ssh-agent -s)" # Ensure ssh-agent is enabled
ssh-add ~/.ssh/id_rsa # Add ssh key to the ssh-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment