SSH passwordless login(免密登陆)

编程入门 行业动态 更新时间:2024-10-28 07:28:35

<a href=https://www.elefans.com/category/jswz/34/1766414.html style=SSH passwordless login(免密登陆)"/>

SSH passwordless login(免密登陆)

linux,windows 都一样。

下面以windows为例:

生成密钥对

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/user/.ssh/id_rsa): ./id_rsa_ss1
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./id_rsa_ss1.
Your public key has been saved in ./id_rsa_ss1.pub.
The key fingerprint is:
SHA256:YgEqk6O7p8iQYc8Cxxxxxxxxxxzqu0UDCRkXeTJIDs user@DESKTOP-8LB6JPN
The key's randomart image is:
+---[RSA 3072]----+
|.=.o+o           |
|o.=o+..          |
...
...
|+.o o +          |
|++ .o+           |
+----[SHA256]-----+

加载私钥

$ ssh-add ./id_rsa_ss1
Could not open a connection to your authentication agent.

出现上面的错误时,Could not open a connection to your authentication agent

$ ssh-agent 

更多推荐

SSH passwordless login(免密登陆)

本文发布于:2024-03-09 04:08:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1723747.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SSH   passwordless   login

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!