使用 gcloud ssh 导致代理拒绝

标签 ssh google-cloud-platform google-compute-engine gcloud

我正在尝试使用 gcloud ssh 连接到谷歌计算引擎,这曾经工作正常。但出于某种原因,我已经碰壁了一段时间了。它在控制台上运行良好。实例是盒子标准的默认实例。

我不断得到

google compute ssh test

sign_and_send_pubkey: signing failed: agent refused operation
Permission denied (publickey).

更详细
google compute ssh test -vvv

...
bug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/mike/.ssh/google_compute_engine
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fpSHA256:bW6Bpi2N67+MIGbRkfLRcdl5ghxQWOAtiRiYazy1JXU
debug3: sign_and_send_pubkey: RSA SHA256:bW6Bpi2N67+MIGbRkfLRcdl5ghxQWOAtiRiYazy1JXU
sign_and_send_pubkey: signing failed: agent refused operation

我尝试了一个新项目,但结果相同。重新安装谷歌云sdk,结果相同。我一定缺少一些设置值,但我不知道我缺少什么。我有 ssh key (由 gcloud 创建的标准 key ,在我的 .ssh 目录中称为 google_compute_engine(.pub)。

任何建议,将不胜感激。

干杯,迈克

最佳答案

在尝试了很多东西之后,我发现

sudo apt-get autoremove gnome-keyring
ssh-add -D
  • 重新启动解决了这个问题。
  • 关于使用 gcloud ssh 导致代理拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41593871/

    相关文章:

    linux - 更改用户并在 1 行中运行 ssh 指令

    bash - ERROR : (gcloud. services.enable) User does not have permission to access project (or it may not exist): 调用者没有权限

    java - Websockets 无法在 Google Compute Engine 上部署的 Tomcat 服务器上运行

    mongodb - Google Compute Engine 上的 Bitnami MongoDB 副本集

    google-compute-engine - Google Cloud 从实例创建镜像

    Git错误: Cannot Spawn ~\. ssh

    ssh - Gulp任务到SSH,然后mysqldump

    ssh - 通过 SSH 在 Xcode 6 下运行 xcodebuild 测试时超时

    rest - gRPC(HTTP/2) 是否比使用 HTTP/2 的 REST 更快?

    unix - 在 Google Cloud Compute Engine 上安装 Nifi