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 "[email protected]"

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 "[email protected]"

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

相关推荐
bubiyoushang8885 小时前
解决 Git 访问 GitHub 时的 SSL 错误
git·github·ssl
海码0079 小时前
【版本控制】Git 和 GitHub 入门教程
git·github
网硕互联的小客服12 小时前
503 Service Unavailable:服务器暂时无法处理请求,可能是超载或维护中如何处理?
服务器·git·github
abcnull14 小时前
github开源协议选择
git·github·开源协议
安庆平.Я16 小时前
git互联GitHub 使用教程
git·github
自来也_1 天前
Git配置代理
git
Jooolin2 天前
【编程史】Git是如何诞生的?这可并非计划之中...
linux·git·ai编程
Lw老王要学习2 天前
VScode 使用 git 提交数据到指定库的完整指南
windows·git·vscode
去旅行、在路上2 天前
Git & Svn
git·svn
abcnull2 天前
github中main与master,master无法合并到main
git·github