问题原文
原帖链接 · Richard · CC BY-SA 4.0
I have an AWS EC2 instance using SLES15. I manually edited /etc/sysconfig/SuSEfirewall2 to open some ports. I messed up the FW_SERVICES_EXT_TCP because I thought I am adding on top of what's already enabled which is sshd. But after reload the rule. sshd port is blocked and I can no longer get back in to fix it. Any options besides using another instance to mount the root volume from the messed up instance?
Thanks in advance.
已采纳解答
原帖链接 · MLu · CC BY-SA 4.0
I'm afraid not. Other than restoring from a snapshot or reinstalling from scratch your best option is probably using another EC2 instance to fix the file.
- Shut down your SLES instance (don't terminate)
- Note down what the root volume device name is (probably
/dev/sda1or/dev/xvda) - Detach the volume and attach to another helper instance.
- Fix the firewall file.
- Unmount and detach the volume from the helper instance and re-attach to the original one under the correct name (
/dev/sda1or/dev/xvda) - Start up and SSH in :)
Hope that helps.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
