我正在尝试使用 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/