在Google Compute Engine中重新启动后无法连接

由于过度使用,我不得不升级我的机器,导致重新启动。 之后,我无法通过PuTTY连接,只能使用Google控制台。

此外,我的SVN存储库在那里,我也无法连接到它。

我查看了“VPC Network”中的防火墙规则,在重启前它们是一样的:

在这里输入图像说明

iptables -L的输出:

[newuser@google-server ~]$ sudo iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere INPUT_direct all -- anywhere anywhere INPUT_ZONES_SOURCE all -- anywhere anywhere INPUT_ZONES all -- anywhere anywhere DROP all -- anywhere anywhere ctstate INVALID REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere FORWARD_direct all -- anywhere anywhere FORWARD_IN_ZONES_SOURCE all -- anywhere anywhere FORWARD_IN_ZONES all -- anywhere anywhere FORWARD_OUT_ZONES_SOURCE all -- anywhere anywhere FORWARD_OUT_ZONES all -- anywhere anywhere DROP all -- anywhere anywhere ctstate INVALID REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) target prot opt source destination OUTPUT_direct all -- anywhere anywhere Chain FORWARD_IN_ZONES (1 references) target prot opt source destination FWDI_trusted all -- anywhere anywhere FWDI_trusted all -- anywhere anywhere Chain FORWARD_IN_ZONES_SOURCE (1 references) target prot opt source destination Chain FORWARD_OUT_ZONES (1 references) target prot opt source destination FWDO_trusted all -- anywhere anywhere FWDO_trusted all -- anywhere anywhere Chain FORWARD_OUT_ZONES_SOURCE (1 references) target prot opt source destination Chain FORWARD_direct (1 references) target prot opt source destination Chain FWDI_trusted (2 references) target prot opt source destination FWDI_trusted_log all -- anywhere anywhere FWDI_trusted_deny all -- anywhere anywhere FWDI_trusted_allow all -- anywhere anywhere ACCEPT all -- anywhere anywhere Chain FWDI_trusted_allow (1 references) target prot opt source destination Chain FWDI_trusted_deny (1 references) target prot opt source destination Chain FWDI_trusted_log (1 references) target prot opt source destination Chain FWDO_trusted (2 references) target prot opt source destination FWDO_trusted_log all -- anywhere anywhere FWDO_trusted_deny all -- anywhere anywhere FWDO_trusted_allow all -- anywhere anywhere ACCEPT all -- anywhere anywhere Chain FWDO_trusted_allow (1 references) target prot opt source destination Chain FWDO_trusted_deny (1 references) target prot opt source destination Chain FWDO_trusted_log (1 references) target prot opt source destination Chain INPUT_ZONES (1 references) target prot opt source destination IN_trusted all -- anywhere anywhere IN_trusted all -- anywhere anywhere Chain INPUT_ZONES_SOURCE (1 references) target prot opt source destination Chain INPUT_direct (1 references) target prot opt source destination Chain IN_trusted (2 references) target prot opt source destination IN_trusted_log all -- anywhere anywhere IN_trusted_deny all -- anywhere anywhere IN_trusted_allow all -- anywhere anywhere ACCEPT all -- anywhere anywhere Chain IN_trusted_allow (1 references) target prot opt source destination Chain IN_trusted_deny (1 references) target prot opt source destination Chain IN_trusted_log (1 references) target prot opt source destination Chain OUTPUT_direct (1 references) target prot opt source destination 

我的SSH密钥仍然在.ssh/authorized_keys但是在使用PuTTY时,即使在询问用户之前,它也会死亡:

 Network error: connection timeout 

当试图更新我的SVN本地副本它死了“因为主机没有回应”。

我已经看了:

  • 这和这不解决问题,因为我使用谷歌控制台访问完美
  • 这也不是,因为它涉及到第一次连接的问题

问题的原因是重启后IP改变了

我认为这是一个很好的电话通知除了重新启动机器可能会受到IP更改,除非你保留一个静态的外部IP 。

幸运的是,这不是我的生产服务器,所以改变只是给我带来了几个小时的挫折,直到我发现问题。