文章目录
  1. 1. sign_and_send_pubkey: signing failed: agent refused operation
  2. 2. Load key “/home/mzz/.ssh/id_rsa”: bad permissions"

引言:明明服务器的authorized_keys里有客户端的public_key,但就是ssh不进去,和多吉一番攀谈交心后解决了问题。


OS环境:Linux

sign_and_send_pubkey: signing failed: agent refused operation

在客户端输入:

1
2
3
4
5
eval "$(ssh-agent -s)"
# 确保进程正在运行后
ssh-add
# 然后再看看是否添加成功
ssh-add -l

Load key “/home/mzz/.ssh/id_rsa”: bad permissions"

这是相关文件权限不足的原因。

在客户端输入:

1
chmod 600 ~/.ssh/id_rsa

大功告成!
文章目录
  1. 1. sign_and_send_pubkey: signing failed: agent refused operation
  2. 2. Load key “/home/mzz/.ssh/id_rsa”: bad permissions"