【问题标题】:After installing Apache on AWS Server I can no longer SSH [closed]在 AWS 服务器上安装 Apache 后,我无法再 SSH [关闭]
【发布时间】:2013-04-30 09:59:18
【问题描述】:

我正在尝试在亚马逊云上创建一个简单的网络服务器。但是每次我在断开连接后安装 apache 时,我都无法再通过 SSH 连接回服务器。

djc@ubuntu:~/Desktop$ ssh -v -i lobbymonitor2.pem ec2-user@ec2-23-20-4-255.compute-1.amazonaws.com
OpenSSH_6.1p1 Debian-4, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to ec2-23-20-4-255.compute-1.amazonaws.com [23.20.4.255] port 22.
debug1: connect to address 23.20.4.255 port 22: Connection refused
ssh: connect to host ec2-23-20-4-255.compute-1.amazonaws.com port 22: Connection refused

Apache 中是否有需要更改但我缺少的设置?

【问题讨论】:

  • 您是否在此期间停止实例?
  • 我尝试过重启它,但没有。但我一定会得到正确的 DN。

标签: apache ssh amazon-web-services amazon-ec2


【解决方案1】:

我会通过以下步骤对其进行调试:

  1. 确保 sshd 服务仍在您的实例上运行。重新启动可能会有所帮助。
  2. 也许您最初将 ssh 配置更改为使用端口 80 而不是 22(这是某些人绕过公司防火墙所做的)。 Apache 现在可能会阻止它。
  3. 能否检查 AWS 实例的安全组(防火墙配置)是否允许 SSH 访问端口 22?

【讨论】:

  • 我会尝试 2。但我知道它不是 3,因为我之前可以 ssh。这与 apache 有关。
【解决方案2】:

我保存了 AMI,然后重新启动了一个新实例。似乎我能够再次连接。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-07-21
    • 1970-01-01
    • 2015-07-19
    • 2014-07-16
    • 1970-01-01
    • 2012-04-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多