CentOS 生成SSH-KEY

煎鱼

一、检查SSH-KEY是否已经生成过

ls -al ~/.ssh

二、生成新的SSH-KEY

ssh-keygen -t rsa -C "your_email@example.com"

三、生成成功

Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
ba:dd:cc:eb:69:f2:eb:99:1a:9c:61:91:8d:8f:50:d0 your_email@example.com
The key's randomart image is:
+--[ RSA 2048]----+
|      .o.        |
|       .E+       |
|      . + .      |
|       . +       |
|        S .      |
|       + o       |
|      . +        |
|       o.=.+     |
|      . oB&o     |
+-----------------+

四、查看生成成功的KEY

cat /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAA11DAQABAAABAQCzPmuU6C5mewB21dVOR4087PIVwIuIUf8XQdOupKYJ5/WLJmJB9Ko2A9e65BCGaBT3jdvXnYMrjcgT1nN//Gtb+jeYieypiP/OJbMCoXVKJOOpDFDiOLV33cdGRuj5VyjfSBne5nCxvgCOxUPko5j4yFTK97ibaXtyzCJPSMA/22IX6QYdyD98pcikJqGhbSZsxhAQJZjostdRC9LwcERAnYF55ejz9336oPyoHztJemDDY4tZ2nGBn1mEMOdBnuaqLusaS4YRS7HlSz11S7ZFJuKAdNlPk3zVw6vws42sJbLVwjXlu454FmLxRO1AkmmEunAfohHBJdHf0R11KGMR your_email@example.com

五、将id_rsa.pub的内容添加到GitLab

阅读 9.6k

煎鱼的清汤锅
今天写代码了吗 :-) 博客地址:[链接]
7.4k 声望
10.3k 粉丝
0 条评论
你知道吗?

7.4k 声望
10.3k 粉丝
宣传栏