运行命令sudo ufw后无法连接ssh允许'Nginx Full' [英] unable to connect ssh after run command sudo ufw allow 'Nginx Full'

查看:184
本文介绍了运行命令sudo ufw后无法连接ssh允许'Nginx Full'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人请帮助我

运行此命令后,我无法连接服务器sudo ufw allow'Nginx Full'.

Im unable to connect my server after run this command sudo ufw allow 'Nginx Full'.

aws中有任何选项可以撤消此更改或其他任何操作

In aws is there any option to undo this changes or anything else

预先感谢

推荐答案

  1. 停止正在运行的EC2实例
  2. 卸下其/dev/sda1 卷(我们将其称为卷A)
  3. 启动新的t1.micro EC2实例,在同一子网中创建它,否则,您将不得不终止该实例并再次创建它.
  4. 将卷A作为/dev/xvdf
  5. 附加到新的微型实例
  6. SSH到新的微型实例,并将卷A装载到/mnt/tmp
  7. 通过在/mnt/tmp/etc/ufw/ufw.conf 中设置 ENABLED = no 禁用UFW
  8. 退出
  9. 终结微实例
  10. 从中分离卷A
  11. 将卷A作为/dev/sda1附加回主实例.
  12. 像以前一样登录
  1. Stop the running EC2 instance
  2. Detach its /dev/sda1 volume (let's call it volume A)
  3. Start the new t1.micro EC2 instance, create it on the same subnet, otherwise you will have to terminate the instance and create it again.
  4. Attach volume A to the new micro instance, as /dev/xvdf
  5. SSH to the new micro instance and mount volume A to /mnt/tmp
  6. Disable UFW by setting ENABLED=no in /mnt/tmp/etc/ufw/ufw.conf
  7. Exit
  8. Terminate micro instance
  9. Detach volume A from it
  10. Attach volume A back to the main instance as /dev/sda1 Start the main instance
  11. Login as before

来源

这篇关于运行命令sudo ufw后无法连接ssh允许'Nginx Full'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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