Created Generate ssh keys (markdown)

deltax 2017-12-30 11:55:45 +01:00
parent b1f1fba200
commit 97adc36adb
1 changed files with 29 additions and 0 deletions

29
Generate-ssh-keys.md Normal file

@ -0,0 +1,29 @@
## Generate ssh keys
Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub without supplying your username or password at each visit. You can now use ssh to clone the repo
and initialize all submodules.
<br>
<br>
**Generate a ssh key**
```
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
```
## Adding your SSH key to the ssh-agent
**Start the ssh-agent in the background**
```
eval "$(ssh-agent -s)"
```
**Add key to ssh agent**
```
ssh-add ~/.ssh/id_rsa
```
## Add to github
The easiest way to do it is to use xclip but you can also copy the data inside the file.
```
xclip -sel clip < ~/.ssh/id_rsa.pub
```
**After:**
1. In the upper-right corner of any page, click your profile photo, then click Settings.
2. In the user settings sidebar, click SSH and GPG keys.
3. Click New SSH key or Add SSH key.
4. In the "Title" field, add a descriptive label for the new key.
5. Click Add SSH key.