昨天,我在Amazon EC2上创建了一个ubuntu-server实例。 实际上我可以ssh到这个实例,我在这个实例上建立了我的开发环境。
但重新启动实例后,我收到ssh错误。我很困惑,因为这个命令和本地机器的环境是一样的!当然,私钥也是一样的。
$ ssh -i "xxx.pem" ubuntu@xxxxxx
Permission denied (publie key).
所以我怀疑我已经编辑了/etc/rc.local来启动我的服务,所以我用一个救援实例清除了这个配置。实际上,我可以成功使用救援实例编辑实例的文件,并在没有ssh的情况下安装卷。 在此救援实例中,我可以使用相同的私钥(.pem)和弹性IP。
环境
安全组
控制台上的实例状态
系统日志
我还检查了网络控制台上的系统日志,我找不到错误。
* Stopping Mount filesystems on boot[74G[ OK ]
* Starting Signal sysvinit that local filesystems are mounted[74G[ OK ]
* Starting flush early job output to logs[74G[ OK ]
* Stopping Failsafe Boot Delay[74G[ OK ]
* Starting System V initialisation compatibility[74G[ OK ]
* Stopping flush early job output to logs[74G[ OK ]
* Starting D-Bus system message bus[74G[ OK ]
* Starting SystemD login management service[74G[ OK ]
* Starting system logging daemon[74G[ OK ]
* Starting early crypto disks... [80G
[74G[ OK ]
* Starting Handle applying cloud-config[74G[ OK ]
* Starting Bridge file events into upstart[74G[ OK ]
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
* Starting AppArmor profiles [80G
[74G[ OK ]
* Setting up X socket directories... [80G
[74G[ OK ]
* Stopping System V initialisation compatibility[74G[ OK ]
* Starting System V runlevel compatibility[74G[ OK ]
open-vm-tools: not starting as this is not a VMware VM
landscape-client is not configured, please run landscape-config.
* Starting xinetd daemon[74G[ OK ]
* Starting ACPI daemon[74G[ OK ]
* Starting save kernel messages[74G[ OK ]
* Starting configure network device security[74G[ OK ]
* Starting OpenSSH server[74G[ OK ]
* Starting regular background program processing daemon[74G[ OK ]
* Starting deferred execution scheduler[74G[ OK ]
* Stopping save kernel messages[74G[ OK ]
* Stopping CPU interrupts balancing daemon[74G[ OK ]
* Starting configure virtual network devices[74G[ OK ]
* Starting automatic crash report generation[74G[ OK ]
* Restoring resolver state... [80G
[74G[ OK ]
Cloud-init v. 0.7.5 running 'modules:config' at Tue, 15 Dec 2015 06:23:27 +0000. Up 6.40 seconds.
* Stopping Handle applying cloud-config[74G[ OK ]
* Stopping cold plug devices[74G[ OK ]
* Stopping log initial device creation[74G[ OK ]
* Starting enable remaining boot-time encrypted block devices[74G[ OK ]
* Starting save udev log and update rules[74G[ OK ]
* Stopping save udev log and update rules[74G[ OK ]
*
* Stopping System V runlevel compatibility[74G[ OK ]
* Starting execute cloud user/final scripts[74G[ OK ]
Cloud-init v. 0.7.5 running 'modules:final' at Tue, 15 Dec 2015 06:23:29 +0000. Up 7.81 seconds.
Cloud-init v. 0.7.5 finished at Tue, 15 Dec 2015 06:23:29 +0000. Datasource DataSourceEc2. Up 7.86 seconds
Ubuntu 14.04.3 LTS ip-10-0-0-17 ttyS0
ip-10-0-0-17 login:
也许我放弃了一些重要的设置,任何人都可以给我这个麻烦的提示吗?