Githup仓库使用密匙连接(win10使用cmd通过ssh远程免密登录linux)

 

 Githup仓库使用密匙连接

本地库生成密匙

 

$ git config --global user.name LIRUILONGS
$ git config --global user.email 1224965096@qq.com
$ ssh-keygen -t rsa -C "1224965096@qq.com"
 

 

复制代码
lenovo@Liruilong MINGW64 /d/node/code/VueDemo (main)
$ git config --global user.name LIRUILONGS

lenovo@Liruilong MINGW64 /d/node/code/VueDemo (main)
$ git config --global user.email 1224965096@qq.com

lenovo@Liruilong MINGW64 /d/node/code/VueDemo (main)
$ ssh-keygen -t rsa -C "1224965096@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/lenovo/.ssh/id_rsa):
Created directory '/c/Users/lenovo/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/lenovo/.ssh/id_rsa.
Your public key has been saved in /c/Users/lenovo/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:QdyY4AUR/wU8De5ZF7/6GagKvd6ejzRYlNCkQtJvR+8 1224965096@qq.com
The key's randomart image is:
+---[RSA 2048]----+
|     .*Bo*=+  .  |
|     .o=+.*+o  o |
|      ..+.o++ . .|
|        .*.= o  .|
|        S =..  . |
|        . o  Eo  |
|       . o o o . |
|        . + = . o|
|        .+o*.. o |
+----[SHA256]-----+

lenovo@Liruilong MINGW64 /d/node/code/VueDemo (main)
复制代码

找到密匙复制到Githup上

 

$ cd ~/.ssh/
$ cat id_rsa.pub

 

 

 

 

复制代码

$ cd ~/.ssh/
lenovo@Liruilong MINGW64 ~/.ssh
$ cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EA3434ABAAABAQCkrUaQU/Li1cY3z0TTWrO34339fhYRlCNvPxkqEXcNLr343
lenovo@Liruilong MINGW64 ~/.ssh
$ pwd
/c/Users/lenovo/.ssh
lenovo@Liruilong MINGW64 ~/.ssh
 
复制代码

 

 

 

 win10使用cmd通过ssh远程免密登录linux

将 id_rsa.pub的内容复制到linux的authorized_keys就可以了

 

 

 

posted @   山河已无恙  阅读(335)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示