gpt4 book ai didi

ssh - 如何解决 Permission denied (publickey,gssapi-keyex,gssapi-with-mic)?

转载 作者:太空宇宙 更新时间:2023-11-03 17:12:38 27 4
gpt4 key购买 nike

以前可能有人问过这个问题,但我不明白这个概念。你能帮我一下吗?

今天早上的奇怪问题..看到我只是将我的文件推送到谷歌云计算然后显示下面的错误..我不知道在哪里看那个错误。

ri@ri-desktop:~$ gcloud compute --project "project" ssh --zone "europe-west1-b" "instance"
Warning: Permanently added '192.xx.xx.xx' (ECDSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

最佳答案

当您的计算实例在其 SSHD 配置中有 PermitRootLogin no 并且您尝试以 root 身份登录时,会发生这种情况。您可以通过在实例名称前添加 username@ 来更改登录用户。这是一个完整的例子:

gcloud compute instances create my-demo-compute \
--zone us-central1-f \
--machine-type f1-micro \
--image-project debian-cloud \
--image-family debian-8 \
--boot-disk-size=10GB

gcloud --quiet compute ssh user@hostname --zone us-central1-f

在上面的示例中,gcloud 将设置正确的凭据并确保您登录。您可以添加 --quiet 以忽略 ssh 密码问题。

关于ssh - 如何解决 Permission denied (publickey,gssapi-keyex,gssapi-with-mic)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27152703/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com