简体   繁体   English

权限被拒绝(公钥)。 -我无法在Google Cloud Platform上登录我的VM

[英]Permission denied (publickey). - I can't login to my VM on Google Cloud Platform

I created a vm on google cloud platform and I can't login by ssh anymore into that VM. 我在Google云端平台上创建了一个虚拟机,但无法再通过ssh登录到该虚拟机。

So I ran that command in the cloudshell : 所以我在cloudshell中运行了该命令:

gcloud compute ssh user@vm

And I got the following output : 我得到以下输出:

Permission denied (publickey). 权限被拒绝(公钥)。 ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]. 错误:(gcloud.compute.ssh)[/ usr / bin / ssh]退出,返回码为[255]。

When I connect using the datalab it works : 当我使用数据实验室进行连接时,它可以正常工作:

gcloud compute ssh datalab@vm 

And I can see the files on the vm through the google cloud shell 我可以通过google cloud shell查看vm上的文件

There are another users who can connect to this VM with their own user account and not just by using the datalab user. 还有其他用户可以使用自己的用户帐户连接到此VM,而不仅仅是使用datalab用户。

So maybe it would be more efficient if they were running commands with their account to help me solve that problem ? 因此,如果他们使用自己的帐户运行命令来帮助我解决该问题,可能会更有效率? (by giving me more rights for example) (例如,授予我更多权利)

I tried to fix the problem by reading the answers to some questions that seems similar but it didn't solve the problem. 我试图通过阅读一些似乎相似但仍不能解决问题的问题的答案来解决该问题。

Do you have an idea what the problem is ? 您知道问题是什么吗? Thank you very much for your answers. 非常感谢您的回答。

Please follow the troubleshooting in this Stack link , especially the one that says remove the SSH key for the server (in your GCE Metadata page) and run the gcloud command again. 请按照此Stack链接中的疑难解答进行操作,尤其是表示删除服务器的SSH密钥(在您的GCE元数据页面中)并再次运行gcloud命令的疑难解答。

If none of them works, you can try running the gcloud command with --ssh-flag="-vvv" to track the root cause of the issue. 如果它们都不起作用,则可以尝试使用--ssh-flag =“-vvv”运行gcloud命令以跟踪问题的根本原因。 If you post any further output here, please make sure to remove private information first. 如果您在此处发布任何其他输出,请确保首先删除私人信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法连接到 GCP VM 权限被拒绝(公钥)错误 - Can't connect to GCP VM Permission denied (publickey) error 谷歌云平台:SSH 到谷歌云实例将有“权限被拒绝(公钥)” - Google Cloud Platform: SSH to Google cloud instance will have "Permission denied (publickey)" 谷歌云源存储库:权限被拒绝(公钥) - Google Cloud Source Repositories: Permission denied (publickey) 如何限制将存储在 Google Cloud Platform 中的 VM 中的文件下载到本地 PC? - How can I restrict downloading of files stored in my VM in Google Cloud Platform to my local PC? 我无法连接到Google Cloud Platform中的弹性搜索 - i can't connect to my elastic search in google cloud platform 我无法在Google Cloud Platform上删除我的项目 - I can't delete my project on google cloud platform 无法在 Google Cloud Platform 上创建 GPU 驱动的 VM 实例 - Can't create a GPU powered VM instance on Google Cloud Platform 为什么我无法通过 Google Cloud Platform 上的 Chrome RDP 连接到我的 Windows 虚拟机? - Why can I not connect to my Windows VM via Chrome RDP on Google Cloud Platform? Google云:我无法访问我的虚拟机 - Google cloud: I can not acces to my VM 如何将 Google Cloud Platform 存储库克隆到 Google Cloud Platform VM - How can I clone Google Cloud Platform repository to Google Cloud Platform VM
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM