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/.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 

原文地址:https://www.cnblogs.com/hxsyl/p/6020707.html