【发布时间】:2020-08-29 13:10:21
【问题描述】:
我在 Google Cloud Platform 的 Compute Engine 中有实例。我的目标是通过 ssh 命令或 putty 连接到这个实例。遵循此指令(除了 Ansible 部分)https://alex.dzyoba.com/blog/gcp-ansible-service-account/ 但是当我尝试通过
连接时ssh -i genereated-key <username of service account>@<external ip>
它给了我
主机密钥验证失败。
或
我也试过用google生成的key,但是没有区别
计算防火墙的规则是:
NAME NETWORK DIRECTION PRIORITY ALLOW DENY DISABLED
default-allow-http default INGRESS 1000 tcp:80 False
default-allow-https default INGRESS 1000 tcp:443 False
default-allow-icmp default INGRESS 65534 icmp False
default-allow-internal default INGRESS 65534 tcp:0-65535,udp:0-65535,icmp False
default-allow-rdp default INGRESS 65534 tcp:3389 False
default-allow-ssh default INGRESS 65534 tcp:22 False
我应该怎么做才能通过 ssh 连接到实例?
【问题讨论】: