首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

解决 Agent admitted failure to sign using the key 有关问题 with ssh

2013-01-25 
解决 Agent admitted failure to sign using the key 问题 with ssh配置ssh之前要在本机上装上ssh,可以通

解决 Agent admitted failure to sign using the key 问题 with ssh

配置ssh

之前要在本机上装上ssh,可以通过sudo apt-get install ssh或者通过新立德来安装。如果没有进行配置的话,登录到本机或者远程主机需要该主机的密码才行。下面进行无密码登录的配置:

?很简单,执行ssh-keygen -t rsa命令,一路敲回车就行了,就在.ssh文件夹下生成了2个文件,一个公钥和一个私钥文件,? id_rsa? id_rsa.pub? ,然后执行cp? ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys命令。这样配置之后就可以实现无密码登录本机。如果需要登录到远程主机,只需要将authorized_keys文件发送到远程主机的~/.ssh/目录下。

現在的 ssh 使用同樣的方法會出現錯誤訊息

Agent admitted failure to sign using the key


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

?

再通过ssh 主机名 就可以实现无密码登录了。

热点排行