SSH passwordless login(免密登陆)

本文介绍了如何在Windows环境下设置SSH免密登陆,包括生成密钥对、解决加载私钥时可能出现的问题,以及如何将公钥部署到目标设备,实现无密码登录。
摘要由CSDN通过智能技术生成

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


                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值