AWS EC2-运行 certbot-auto 后无法连接

AWS EC2-运行 certbot-auto 后无法连接

我有一个运行良好的 AWS EC2 实例,已有几年了。我有一个“letsencrypt”证书,我试图使用 certbot-auto 脚本对其进行扩展。安装/更新“cryptography”时,脚本卡住了,几分钟后,我从 ssh 收到“管道损坏”消息。这是当时发生的事情:

Collecting certbot-apache==0.15.0 (from -r /tmp/tmp.RYkFrIBj5R/letsencrypt-auto-requirements.txt (line 184))
  Downloading certbot_apache-0.15.0-py2.py3-none-any.whl (135kB)
    100% |████████████████████████████████| 139kB 28.3MB/s 
Collecting certbot-nginx==0.15.0 (from -r /tmp/tmp.RYkFrIBj5R/letsencrypt-auto-requirements.txt (line 187))
  Downloading certbot_nginx-0.15.0-py2.py3-none-any.whl (65kB)
    100% |████████████████████████████████| 65kB 24.6MB/s 
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /root/.local/share/letsencrypt/lib/python2.7/site-packages (from cryptography==1.8.2->-r /tmp/tmp.RYkFrIBj5R/letsencrypt-auto-requirements.txt (line 45))
Installing collected packages: argparse, pycparser, asn1crypto, cffi, ConfigArgParse, six, configobj, idna, pyparsing, packaging, enum34, ipaddress, cryptography, funcsigs, linecache2, ordereddict, parsedatetime, pbr, pyOpenSSL, pytz, pyRFC3339, python-augeas, requests, traceback2, unittest2, zope.interface, zope.event, zope.component, mock, acme, certbot, letsencrypt, certbot-apache, certbot-nginx
  Running setup.py install for pycparser ... done
  Running setup.py install for cffi ... done
  Running setup.py install for ConfigArgParse ... done
  Running setup.py install for configobj ... done
  Running setup.py install for enum34 ... done
  Running setup.py install for cryptography ... \packet_write_wait: Connection to xx.xx.xxx.xxx port 22: Broken pipe

我无法重新连接,因此我重新启动了机器(通过 AWS 控制台),然后查看了系统日志(再次通过 AWS 控制台)。日志尾部显示以下内容:

Starting sshd: [  OK  ]
ntpdate: Synchronizing with time server: [  OK  ]
Starting ntpd: [  OK  ]
Starting S64mysqld:  [  OK  ]
Starting sendmail: [  OK  ]
Starting sm-client: [  OK  ]
Starting tomcat7: [  OK  ]
Starting httpd: [  OK  ]
Starting crond: [  OK  ]
Starting atd: [  OK  ]
Starting cloud-init: Cloud-init v. 0.7.6 running 'modules:final' at Wed, 28 Jun 2017 17:33:48 +0000. Up 12.76 seconds.
Cloud-init v. 0.7.6 finished at Wed, 28 Jun 2017 17:33:48 +0000. Datasource DataSourceEc2.  Up 12.92 seconds
starting DenyHosts:    /usr/bin/env python /usr/local/bin/denyhosts.py --daemon --config=/usr/share/denyhosts/denyhosts.cfg

Amazon Linux AMI release 2017.03
Kernel 4.9.27-14.31.amzn1.x86_64 on an x86_64

myserver login: 

为什么会出现登录提示?查看“实例屏幕截图”也显示登录提示。我有另一个实例,它正常运行,但没有显示任何登录提示,所以我认为这不正常,可能是我的问题的原因!有什么想法可以解决这个问题吗?

谢谢!

答案1

所有 Linux 服务器都会在任何启动序列结束时显示登录提示。您可以运行一个现货实例来确认这一点。

当我这样做时,系统日志是一个黑色矩形,但实例屏幕截图显示了非常相似的内容。

Amazon Linux 实例屏幕截图

相关内容