eko*_*man 2 authentication ssh instance public-key gcloud
我正在尝试为gcloud实例设置新的ssh密钥。我完全按照此处的说明(https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys)进行操作,生成了一个新密钥,并将带有我的用户名的公共rsa-ssh密钥放在SSH上Google Cloud Platform界面中“元数据”标签的“密钥”部分,并使用chmod为我的公钥和私钥设置适当的权限。
尝试使用-vvv详细标志进行ss时,我收到一条错误的结尾如下:
...
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/erickofman/.ssh/salsadb
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).
我(与同事一起)确保我的公钥包含在服务器的.ssh文件夹中的authorized_keys文件中。认为可能只是过时了,所以我也尝试重新启动ssh服务器service sshd restart,但无济于事。
我还尝试使用gcloud工具设置ssh,结果相同。
据我所知,我对网站具有正确的角色/权限。
这是服务器端日志的样子:
admin@awesome-website:~$ tail /var/log/auth.log
Nov 15 20:40:16 awesome-website sshd[18846]: input_userauth_request: invalid user ekofman [preauth]
Nov 15 20:40:17 awesome-website sshd[18846]: Connection closed by 10.100.100.10 port 90001 [preauth]
Nov 15 20:41:17 awesome-website sshd[18848]: Connection closed by 200.200.20.20 port 90002 [preauth]
我为此付出了一点努力,非常感谢任何帮助!
Whelp证明,除非实现完全实例重新启动,否则不会合并新的ssh密钥。不是ssh服务器重启,而是完整实例重启(停止gcloud实例,然后启动gcloud实例)。它没有在文档中说明这一点,很高兴知道以供将来参考。
| 归档时间: |
|
| 查看次数: |
3222 次 |
| 最近记录: |