小编NEO*_*NEO的帖子

无法通过 ssh 连接到 GCE:“权限被拒绝(公钥)”

我通过 Google Compute Engine 中的 Bitnami 创建了一个 VM。以前,我可以通过 Bitnami Web 界面进行 ssh。我试图通过 Mac 上的终端 ssh,但一直收到Permission denied (publickey)错误消息。然后我删除了服务器和我的 Mac 上的所有密钥,并从 bitnami 下载了 pem 文件并使用-i了连接选项,但问题仍然存在。

ssh -i bitnami-gce.pem xxx@1xx.1xx.5x.1xx -v
Run Code Online (Sandbox Code Playgroud)

完整的调试信息:

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to 1xx.1xx.5x.1xx [1xx.1xx.5x.1xx] port 22.
debug1: Connection established.
debug1: identity file bitnami-gce.pem type -1
debug1: identity file bitnami-gce.pem-cert type -1
debug1: Enabling compatibility mode for protocol …
Run Code Online (Sandbox Code Playgroud)

debian ssh ssh-keys google-compute-engine google-cloud-platform

35
推荐指数
4
解决办法
8万
查看次数