我在Ubuntu服务器上用UFW设置防火墙,我跳过了步骤 sudo ufw allow ssh
而是运行命令 sudo ufw enable
. 重新启动VPS但现在当我尝试使用ssh进行连接时,我收到以下错误 ssh: connect to host {IP Address} port 22: Operation timed out
.
我使用的是Google Cloud 计算基础架构,我不了解本文的详细信息https://cloud.google.com/compute/docs/ssh-in-browser#ssherror
有没有办法可以回滚?
1 回答
您可以使用串行控制台登录您的实例 . 登录后,您应该运行命令:
sudo ufw allow ssh
,以允许ssh访问您的实例 .有关更多信息,请参见Interacting with the Serial Console