git 配置多个ssh私钥时提示Bad owner or permissions on /root/.ssh/config?

我已经给~/.ssh/config chmod 600了

[root@localhost .ssh]# chmod 600 config
[root@localhost .ssh]# ssh -T git@github.com
Bad owner or permissions on /root/.ssh/config
阅读 7.8k
2 个回答

可以从下面几个地方去考虑:

  1. 本地的 config 文件属主 或者 权限.
  2. 远程主机的 config 文件属主 或者 权限.
  3. 先通过 ssh 去调试下, 如果ssh没问题, 那就考虑其他原因
chmod 600 ~/.ssh/config
chown $USER ~/.ssh/config
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题