前端之家收集整理的这篇文章主要介绍了
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
原文链接:https://www.f2er.com/centos/374678.html