I using the following command to create SSH key in git
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
on git bash, but when I enter this command on bash it is displaying another command list and not generate SSH Key. Then how can I generate Key?
I using the following command to create SSH key in git
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
on git bash, but when I enter this command on bash it is displaying another command list and not generate SSH Key. Then how can I generate Key?
Create your ssh key using ssh-keygen -o -t rsa -b 4096 -C "[email protected]"
After list file in folder ~./ssh and see if your key exist. Use:
ls ~/.ssh/
To Generate ssh:
Step 1:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Replace it with Your Mail id
Enter passphrase if you want you can leave this blank
Step 2:
eval $(ssh-agent -s)
You will get Agent pid (Don't Need to copy it)
Step 3:
ssh-add ~/.ssh/id_rsa
Step 4:
cat < ~/.ssh/id_rsa.pub
Copy Down the Displayed key including your mail id
Then Goto Github > Settings > SSH And GPG keys > Click New RSA(Green Button) > Give a random title to the key and paste down the key below Tap Add SSH Key.
Using SSH (Secure Shell) instead of https seems the Secure & Fastest method. Just providing few links and tips here to make things a bit easy. You can check this step-by-step guide! provided by docs.github to "Check existing SSH keys, Generate, Add a new SSH key to your GitHub account, and more."
Tip #1: During the process you need to confirm SSH key fingerprints to validate the connection. Compare the key of the algorithm you chose respectively (RSA, ECDSA, or Ed25519) and confirm it. Check this link to compare the key: GitHub's public key fingerprints!
Tip #2: If you don't want to type passphrase every time you push, just press enter when it prompts to choose passphrase.
CAUTION: Other methods using https $ git config credential.helper store etc., even with using 'timeout' might seem faster but are 100% unencrypted and hence not secure. However, you can encrypt that config file and just decrypt it before use, but there is still a chance we might forget to encrypt it again after use. You can use it at your discretion.
ssh-keygen -t ed25519 -C "your_github_email_address"
dont write any passphrase, so enter
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): enter
Enter same passphrase again: enter
pbcopy < ~/.ssh/id_ed25519.pub
cd ~/.ssh
cat id_ed25519.pub
and copy the content to github
ssh-..e9 AAA...+T5 [email protected]
https://medium.com/codex/clone-github-private-repository-using-ssh-on-mac-acc9110d1cfe
Crea o edita el archivo ~/.ssh/config para gestionar múltiples claves SSH o para asegurarte de que estás usando la clave correcta. Si no tienes un archivo de configuración, puedes crear uno.
nano ~/.ssh/config
Añade la configuración adecuada. Por ejemplo:
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
ssh-keygen -p$in your command? You should not, that$is a prompt that bash displays. The command you type should start withssh-keygen…