我在中通过Bitnami创建了一个VM。以前,我能够通过Bitnami网络界面进行ssh。我试图通过我的Mac终端进行ssh,但一直得到Permission denied (publickey)错误。然后,我删除了服务器和Mac上的所有键,并从bitnami下载了pem文件,并使用-i选项进行连接,但问题仍然存在。
ssh -i bitnami-gce.pem xxx@1xx.1xx.5x.1xx -v完成调试信息:
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 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Debian-4~bpo70+1
debug1: match: OpenSSH_6.6.1p1 Debian-4~bpo70+1 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA <RSA KEY>
debug1: Host '1xx.1xx.5x.1xx' is known and matches the RSA host key.
debug1: Found key in /Users/xxx/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: bitnami-gce.pem
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).我不能告诉主人。所以现在不能向服务器发送任何密钥。如何解决这个问题?
编辑:我试着通过谷歌网络控制台进行ssh,我可以做到。有人能告诉我从任何地方到ssh的确切步骤吗?我更喜欢简单的用户名和密码方式,如何配置它呢?
发布于 2014-11-02 16:11:05
在我能够通过Google控制台进行ssh之后,我执行了以下步骤来解决这个问题:
ssh-keygen生成ssh密钥~/.ssh/authorized_keys文件sudo nano ~/.ssh/authorized_keys发布于 2019-03-21 23:54:56
由于用户的原因,我也遇到了同样的情况。在谷歌网站上,嘘,我的用户名显示了我邮件的第一部分。所以,我正试着像这样
ssh <first_part_of_gmail>@google_vm_external_ip稍后,我发现,google基于在google设置上放置的ssh键创建了一个用户。因此,首先在公钥末尾检查用户,然后尝试如下
ssh <user_name_at_the_end_of_public_key>@google_vm_external_iphttps://serverfault.com/questions/641453
复制相似问题