git

git sshkeygen 生成步骤

2016-07-14  本文已影响2798人  蚂蚁牙齿不黑
 cd ~/.ssh
 ls -al
drwxr-xr-x   7 liangkuiyuan  staff   238  7 14 10:18 .
drwxr-xr-x+ 30 liangkuiyuan  staff  1020  7 14 10:36 ..
-rw-------   1 liangkuiyuan  staff  1675  7 14 10:15 id_rsa
-rw-r--r--   1 liangkuiyuan  staff   407  7 14 10:15 id_rsa.pub
-rw-r--r--   1 liangkuiyuan  staff   394  7 14 10:18 known_hosts
-rw-------   1 liangkuiyuan  staff  1679  7 14 09:37 y
-rw-r--r--   1 liangkuiyuan  staff   407  7 14 09:37 y.pub

现在要做的就是删除以下三个文件

id_rsa
id_rsa.pub
known_hosts
ssh-keygen -t rsa -C "kerain.liang@jiuzhang.net"
Generating public/private rsa key pair.
// 第一次提示信息   按第一次回车   不输任何信息
Enter file in which to save the key (/Users/liangkuiyuan/.ssh/id_rsa): 
// 第二次提示信息   按第二次回车   不输任何信息
Enter passphrase (empty for no passphrase): 
// 第三次提示信息   按第三次回车   不输任何信息
Enter same passphrase again: 
Your identification has been saved in /Users/liangkuiyuan/.ssh/id_rsa.
Your public key has been saved in /Users/liangkuiyuan/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:IhNkHkezvAbVAITk2h1lcIqPK22mBYqU1RsS33Uw/Ts kerain.liang@jiuzhang.net
The key's randomart image is:
+---[RSA 2048]----+
| ..+B+Xo +o.     |
| ..=+X.oo o.     |
|  oo*+o.    .    |
| oo+.+o.     .   |
|ooo =.+ S     .  |
|+o . + .     E   |
|+ *           .  |
| *               |
|.                |
+----[SHA256]-----+
cat id_rsa.pub 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDK/Xz207+T2knfLxDDRUmmCWpMN5ItUVW2fWNMPFGj6O5fxzkkryiOK+bFbHQD2MGipMPuP9+FyyMmYIkHjouZWVBkEdki0TldaJ4Ght4k6UBDnpCk8S1lW+BK0WsRUbxlrDtD9iirUikNyyyrA9r+4ALJg9fQ2o+2TmuipWbY7d26pQnFdpVcgOKTDeaU3cb/HusUQFc5rFwlNiMLBdW/KEtD+JQowHAew8rLvunZkpN7wOCzoZESO9V/64ylKV556RahbyD7GmxSQUHCm7B/HEJVo/n5+Ik99eDsRb+aiVYFrg0B8EUGRQBhC/CjJmuEfjmRS+idj0daeFpL08Dr kerain.liang@jiuzhang.net

ls -al 查看所有的文件
利用 cat 指令 cat id_rsaid_rsa.pub就是了 复制下来粘贴到git 账户

Paste_Image.png
上一篇下一篇

猜你喜欢

热点阅读