SSH无密码登陆Agent admitted failure to sign using the key

简介: A :CentOS_Master B:Slave_1 C:Slave_2 普通用户hxsyl 1.现在A 上 ssh-keygen -t rsa 一路回车,不需要输入密码 执行该操作将在/home/hxsyl/.

A :CentOS_Master

B:Slave_1

C:Slave_2

普通用户hxsyl

1.现在A 上 ssh-keygen -t rsa

一路回车,不需要输入密码

执行该操作将在/home/hxsyl/.ssh下生成id_rsa, id_rsa.pub文件,其中id_rsa.pub是公钥

2.scp /home/hxsyl/.ssh/id_rsa.pub hxsyl@B:.ssh/authorized_keys

3.登陆时候

出现Agent admitted failure to sign using the key

解決方式 使用 ssh-add 指令将私钥 加进来 (根据个人的密匙命名不同更改 id_rsa)
# ssh-add   ~/.ssh/id_rsa 

目录
相关文章
|
5月前
|
消息中间件 安全 Unix
SSH配置多台服务器之间的免密登陆以及登陆别名
SSH配置多台服务器之间的免密登陆以及登陆别名
162 1
|
2月前
|
安全 Shell 网络安全
告别繁琐密码,一键解锁GitHub高效秘籍!SSH配置大揭秘,让你的代码托管之旅飞起来!
【8月更文挑战第4天】在使用GitHub时,频繁输入账号密码颇为不便。采用SSH协议可提升安全性并简化流程。本文以问答形式指导你快速配置GitHub SSH:了解SSH优势、学会生成与添加SSH密钥及测试连接。通过简单的步骤,即可实现无缝代码推送与拉取,享受高效、安全的开发体验。记得保护好私钥并根据需要设置多个密钥对。
51 7
|
2月前
|
安全 Linux Shell
Linux系统之间实现免密码登录(SSH无密码登录
【8月更文挑战第21天】要在Linux系统间实现SSH免密码登录,需先在源机器生成SSH密钥对,然后将公钥复制到目标机器的`.ssh/authorized_keys`文件中。可通过`ssh-keygen`命令生成密钥,并使用`ssh-copy-id`命令传输公钥。最后测试SSH连接,确保能无密码登录。若目标机器缺少相关目录或文件,需手动创建并设置适当权限。完成这些步骤后,即可实现安全便捷的免密码登录。
80 0
|
4月前
|
安全 Linux Shell
SSH服务器拒绝密码登录的解决方法
SSH服务器拒绝密码登录的解决方法
1045 1
|
3月前
|
网络安全 数据安全/隐私保护
服务器密码登录出现了:SSH connection failed: connect ECONNREFUSEDxxxxxxxx:22 * Xshell提示 SSH connection fa
服务器密码登录出现了:SSH connection failed: connect ECONNREFUSEDxxxxxxxx:22 * Xshell提示 SSH connection fa
|
3月前
|
安全 Linux 网络安全
ssh中的密码登录和密钥登录
ssh中的密码登录和密钥登录
|
3月前
|
Linux 网络安全 数据安全/隐私保护
如何在Linux中设置SSH无密码登录
这样,你就设置了SSH无密码登录。但请注意,这种方式虽然方便,但如果你的私钥落入他人手中,他们就能访问你的服务器,所以要妥善保管你的私钥。
68 0
|
5月前
|
安全 网络安全
jsch 报错 no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 如何处理
【5月更文挑战第24天】jsch 报错 no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 如何处理
382 1
|
4月前
|
网络安全
ssh: Could not resolve hostname centos02: Temporary failure in name resolution
ssh: Could not resolve hostname centos02: Temporary failure in name resolution
340 0
|
5月前
|
算法 网络安全
Unable to negotiate with 127.0.0.1 port 29215: no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 解决
【5月更文挑战第5天】Unable to negotiate with 127.0.0.1 port 29215: no matching host key type found. Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha> 解决
242 7