Created
July 8, 2024 13:17
-
-
Save walternascimentobarroso/f3fc73e5eea2b9ce0fffbb13aaae2d3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Gera uma chave SSH com seu email | |
| echo "Digite o seu email para gerar a chave SSH:" | |
| read user_email | |
| ssh-keygen -t ed25519 -C "$user_email" -f ~/.ssh/id_ed25519 -N "" | |
| # Adiciona a chave SSH ao agente SSH | |
| eval "$(ssh-agent -s)" | |
| ssh-add ~/.ssh/id_ed25519 | |
| # Exibe a chave pública | |
| echo "Aqui está a sua chave pública SSH. Copie e adicione-a ao seu GitHub:" | |
| cat ~/.ssh/id_ed25519.pub | |
| # Abre a página de adição de nova chave SSH no GitHub (macOS only) | |
| open "https://github.com/settings/ssh/new" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment