Git 基于ED25519、RSA算法生成 SSH 密钥

Git 基于ED25519、RSA算法生成 SSH 密钥

基于ED25519算法,生成密钥对命令如下:

bash 复制代码
ssh-keygen -t ed25519 -C "邮箱地址"

基于RSA算法,生成密钥对命令如下:

bash 复制代码
ssh-keygen -t rsa -C "<注释内容>"

基于ED25519算法

1.管理员权限运行Git Bash

2.输入生成密钥指令点击回车,选择 SSH 密钥生成路径。

bash 复制代码
$ ssh-keygen -t ed25519 -C "2267521563@qq.com"

3.以 ED25519 算法为例,直接按回车保存默认路径,

也可自定义路径:windows下要进行路径转换 /d/DataBase/Git/.ssh/ed25519,确保有文件夹D:\DataBase\Git\.ssh

bash 复制代码
Generating public/private ed25519 key pair.
Enter file in which to save the key (/c/Users/Dexter/.ssh/id_ed25519): /d/DataBase/Git/.ssh/ed25519

密钥生成路径为:D:\DataBase\Git\.ssh\ed25519
公钥生成路径为:D:\DataBase\Git\.ssh\ed25519.pub

基于RSA算法

1.管理员权限运行Git Bash

2.输入生成密钥指令点击回车,选择 SSH 密钥生成路径。

bash 复制代码
$ ssh-keygen -t rsa -C "2267521563@qq.com"

3.以 RSA算法为例,直接按回车保存默认路径,

也可自定义路径:windows下要进行路径转换 /d/DataBase/Git/.ssh/rsa,确保有文件夹D:\DataBase\Git\.ssh

bash 复制代码
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Dexter/.ssh/id_rsa): /d/DataBase/Git/.ssh/rsa

密钥生成路径为:D:\DataBase\Git\.ssh\rsa
公钥生成路径为:D:\DataBase\Git\.ssh\rsa.pub

相关推荐
高调的涵涵1 天前
删了1.2GB,.git仍是1.2GB
git
程序员沉梦听雨1 天前
【Git】git-submodule子模块管理
git
全栈陈序员2 天前
Git】从入门到精通(八)—— git log:查看提交历史
大数据·git·elasticsearch
7177773 天前
Git自建用什么工具比较好:Gitea、Forgejo、GitLab CE与Gitee的选型对比
git·gitlab·gitea
lsc_blog3 天前
年底还在招的岗位,先确认缺口和到岗要求
git·缓存·ci/cd·职场和发展·github
全栈陈序员4 天前
【Git】从入门到精通(十一)—— git reset 三种模式详解
git·elasticsearch
全栈陈序员4 天前
【Git】从入门到精通(十)—— 撤销与恢复:git checkout与git restore
运维·网络·数据库·git
全栈陈序员4 天前
【Git】从入门到精通(五)—— git add:将文件加入暂存区
大数据·git·elasticsearch
全栈陈序员4 天前
【Git】从入门到精通(七)—— git status:查看仓库状态
大数据·git·elasticsearch
莫晓燚4 天前
Ansible 13 个常用模块---企业实战
git·github