【问题标题】:Permission denied (publickey,gssapi-keyex,gssapi-with-mic) on MacMac 上的权限被拒绝(公钥、gssapi-keyex、gssapi-with-mic)
【发布时间】:2022-11-13 19:11:37
【问题描述】:

我想通过运行ssh -i new_ssh_key centos@0.0.0.0 从我的 Mac(终端)连接到 GCP 实例(centos) 我得到了错误centos@0.0.0.0: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

直到昨天,当 SCP 命令没有成功时,一切正常,所以我更改了权限,可能出了点问题,现在我根本无法连接到 centos 服务器。

感谢您对此的任何帮助。

【问题讨论】:

  • 问题:1你把IP改成0.0.0.0是为了保护无辜?如果只是将其设为 203.0.113.1(用于示例的 ip 范围。)2在尝试登录之前,您将 new_ssh_key 的公钥副本复制到 GCP?
  • 请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如它目前所写的那样,很难准确地说出你在问什么。

标签: macos ssh key private-key


【解决方案1】:

我修复了在 /etc/ssh/ssh_config 中添加以下行

HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa

如图所示:

【讨论】:

    猜你喜欢
    • 2013-05-19
    • 2021-03-12
    • 2017-12-21
    • 2016-03-03
    • 1970-01-01
    • 2023-03-20
    • 2015-05-26
    • 2021-09-01
    • 1970-01-01
    相关资源
    最近更新 更多