云服务器网:购买云服务器和VPS必上的网站!

ubuntu怎么获取sshkey

ubuntu怎样获得sshkeyubuntu获得sshkey的方法:1.打开终端命令行。2.输入以下命令。ssh-keygen -t rsa -C \”your_email@example.com\” //your_email@example.com为你在GitH

ubuntu怎样获得sshkey

ubuntu获得sshkey的方法:

1.打开终端命令行。

2.输入以下命令。

ssh-keygen -t rsa -C "your_email@example.com" //your_email@example.com为你在GitHub还是GitLab注册时的邮箱

2.履行后,终端会显示以下结果,按回车保存。

Created directory '/Users/xxx/.ssh'.

Enter passphrase (empty for no passphrase):

3.提示设置 passphrase,设置成功后会显示:

Your identification has been saved in /Users/xxx/.ssh/id_rsa.

Your public key has been saved in /Users/xxx/.ssh/id_rsa.pub.

The key fingerprint is:

16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48 your_email@example.com

The key's randomart image is:

心形图形

4.接着在终端输入以下命令:

ssh-add ~/.ssh/id_rsa

5.按要求填刚刚设置的passphrase,成功后会显示:

Identity added: /Users/xxx/.ssh/id_rsa (/Users/xxx/.ssh/id_rsa)

6.最后再输入以下命令就能够获得你的sshkey了,命令以下:

cat /Users/xxx/.ssh/id_rsa.pub

本文来源:https://www.yuntue.com/post/75425.html | 云服务器网,转载请注明出处!

关于作者: yuntue

云服务器(www.yuntue.com)是一家专门做阿里云服务器代金券、腾讯云服务器优惠券的网站,这里你可以找到阿里云服务器腾讯云服务器等国内主流云服务器优惠价格,以及海外云服务器、vps主机等优惠信息,我们会为你提供性价比最高的云服务器和域名、数据库、CDN、免费邮箱等企业常用互联网资源。

为您推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注