1 回答
- 最新
- 投票最多
- 评论最多
0
【以下的回答经过翻译处理】 你好,Picarda,
我建议尝试下面的修复方式来解决这个问题:
- 停止实例。
- 如果使用旧版 AWS 控制台,请进入实例设置 -> 查看/更改用户数据。 如果使用新版 AWS 控制台视图:在已停止实例上右键单击 -> 实例设置 -> 编辑用户数据。
- 将以下代码复制并粘贴到“修改用户数据”选项中,并保存。
Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0
--//
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config.txt"
#cloud-config
cloud_final_modules:
- [scripts-user, always]
--//
Content-Type: text/x-shellscript; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="userdata.txt"
#!/bin/bash
ufw disable
iptables -L
iptables -F
--//
- 启动实例。
注意:您可能需要编辑 SSH 命令中实例的公共 IP 地址,以确保连接到正确的实例,因为该实例的 IP 地址可能已更改。
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 3 年前
- AWS 官方已更新 1 年前