Github Generate Ssh Key Generate
Mac and Linux
Oct 29, 2017 If the key-file does not exist yet, a new key will be generated. Cd generate-and-send-ssh-key./generate-and-send-ssh-key.sh -user bob -host myhost This will ask for the password of the target host at least once, probably twice, if the permissions are not set correctly yet.
Open Terminal
Check if you already have a SSH keypair generated. Do the following:
If the files exist, you already have SSH installed. IMPORTANT: But if you wish to regenerate the SSH key pair, at least back up your old SSH keys.
Generate key file with our keygen. Generate a 4096-bit key pair - yes, use the higher bit
Enter a file in which you want to save your keys. You can press enter and the default
~/.ssh/id_rsa
will be used.Enter a passphrase. Read Github working with SSH key passphrase articule on why you should use a passphrase and at the same time you don't have to enter the passphase everytime you use your SSH key.
From here on your SSH key pair is generated, your SSH public key is
~/.ssh/id_rsa.pub
- the one with thepub
extension. BE EXTRA CAREFUL when using your~/.ssh/id_rsa
file. This is your private key, guard it properly.
- I have two Gitlab accounts. On my old account I added an ssh-key that is located in /.ssh/idrsa.pub on my computer. Now I want to add another ssh-key for my new Gitlab account. How do I do this.
- Generate SSH public keypair from SSH RSA/DSA/EC private key in Scala - genssh.scala.
Windows
Generate Ssh Key Git Bash
- Install Git for Windows
- Open Git Bash and repeat the above instructions