启用UFW后,SSH重新回到AWS Lightsail [英] SSH back to AWS Lightsail after UFW enabling

查看:90
本文介绍了启用UFW后,SSH重新回到AWS Lightsail的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在注销之前,我已启用UFW服务而未允许SSH访问.

I've enabled the UFW service without allowing SSH access before then logging off.

我现在无法SSH返回实例.

I am now unable to ssh back to the instance.

我已经采取的步骤:

  • 制作快照并从中创建新实例

推荐答案

要点:尝试在创建新实例时执行命令(禁用防火墙).我可以通过使用AWS CLI来做到这一点:

The general point: try to execute a command (firewall disabling) while creating a new instance. I was able to do it with the usage of AWS CLI:

aws lightsail create-instances-from-snapshot --region eu-central-1 --instance-snapshot-name TEST_SSH_FIX-1591429003 --instance-names TEST_SSH_FIX_2 --availability-zone eu-central-1a --user-data 'sudo service ufw stop' --bundle-id nano_2_0

它的工作.

这篇关于启用UFW后,SSH重新回到AWS Lightsail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆