Mac生成SSH Key

DevOps Mac评论1,129字数 985阅读3分17秒阅读模式

生成新的秘钥

你需要把邮件地址换成你自己的邮件地址,然后一路回车,使用默认值即可,因为这个Key仅仅用于简单的服务,所以也无需设置密码。

完成后会有如下显示

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /Users/你的电脑用户名/.ssh/id_rsa.

Your public key has been saved in /Users/你的电脑用户名/.ssh/id_rsa.pub.

The key fingerprint is:

SHA256:5V6ZCQNS/3bVdl0GjGgQpWMFLazxTslnKbW2B1mbC+E example@qq.com

devops@DevopsdeMacBook-Pro ~ % ssh-keygen -t rsa -C "zhen.guo@pplingo.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/devops/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/devops/.ssh/id_rsa
Your public key has been saved in /Users/devops/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:4xsUqRuFAjD2dp73LDwwhB49KpuSI268wAwYYhk3DbU zhen.guo@pplingo.com
The key's randomart image is:
+---[RSA 3072]----+
|o+.++.           |
|..=.+... .       |
|oo =.E. +        |
|+.o *.oo .       |
|o. o =o.S        |
|+.+   ==o.       |
|B=    .+oo       |
|=+      oo       |
|.o.     .        |
+----[SHA256]-----+
devops@DevopsdeMacBook-Pro ~ %

如果服务器端需要公钥, 直接把.ssh目录下的id_rsa.pub配置即可, id_rsa为私钥一定要保密!!!!

继续阅读
DevOps
  • 本文由 发表于 2022年9月13日 18:16:16
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
Linux SSH免密钥登录 CentOS

Linux SSH免密钥登录

原理图 生成证书 客户端生成密钥对。 将公钥信息写入目标服务器、目标账户的配置文件。该操作隐含表示了客户端拥有对目标服务器的控制权。 协商交互过程  客户端向...
Mac安装wget Mac

Mac安装wget

安装wget brew install wget 测试下载 devops@DevOpsdeMacBook-Pro ~ % wget http://nginx.org/download/nginx...
Mac安装python Mac

Mac安装python

安装Python 3 brew install python 安装完 Python has been installed as /opt/homebrew/bin/python3 ...
评论  0  访客  0

发表评论