运维开发网

CentOS 生成SSH-KEY

运维开发网 https://www.qedev.com 2020-04-17 14:44 出处:网络 作者:运维开发网整理
一、检查SSH-KEY是否已经生成过 ls -al ~/.ssh 二、生成新的SSH-KEY ssh-keygen -t rsa -C \"your_email@example.com\"

一、检查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

0

精彩评论

暂无评论...
验证码 换一张
取 消