markdown SSH密钥生成和

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown SSH密钥生成和相关的知识,希望对你有一定的参考价值。

# SSH Keys Generation


### Checking for existing SSH keys first

```TXT
ls -al ~/.ssh
```

### Generating a new SSH key
```TXT
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
```

### Adding your SSH key to the ssh-agent
```TXT
eval "$(ssh-agent -s)"
```

### Add your SSH private key to the ssh-agent and store your passphrase in the keychain
```TXT
ssh-add -K ~/.ssh/id_rsa
```

### Adding a new SSH key to your GitHub account
```TXT
pbcopy < ~/.ssh/id_rsa.pub
```

### If it doesn’t work (do not copy it) use:

```TXT
cat git_rsa.pub 
```

This will list the key, then just copy it and paste into the deploy key on the GitHub repo

## Modify existing SSH

### CD into .ssh

```TXT
cd ~/.ssh
```

```TXT
ls -la
```

```TXT
vim known_hosts
```

Then change the credentials if necessary and save it

以上是关于markdown SSH密钥生成和的主要内容,如果未能解决你的问题,请参考以下文章

markdown 生成SSH密钥对

markdown 如何备份和恢复ssh密钥

markdown SSH授权密钥

markdown SSH密钥添加到系统中

markdown 管理SSH密钥

markdown SSH密钥管理。