解决Agent admitted failure to sign using the key问题with ssh
解决Agent admitted failure to sign using the key问题with ssh
解决Agent admitted failure to sign using the key问题with ssh
配置ssh
www.2cto.com
之前要在本机上装上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 使用同樣的方法會出現錯誤訊息
www.2cto.com
Agent admitted failure to sign using the key
解決方式 使用 ssh-add 指令将私钥 加进来 (根据个人的密匙命名不同更改 id_rsa)
# ssh-add ~/.ssh/id_rsa
再通过ssh 主机名 就可以实现无密码登录了。
评论暂时关闭