AWS EC2忘记密码并且无法使用SSH [英] AWS EC2 forgot password and not able to use SSH

查看:697
本文介绍了AWS EC2忘记密码并且无法使用SSH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ec2-ubuntu实例。现在,我忘记了该用户的密码。不幸的是,我也失去了以前用于腻子的.pem文件和.ppk文件。而且很难进入。我想在其中升级一些代码。

I have an ec2-ubuntu instance. And now I forgot the password for the user. Unfortunately i've also lost the .pem file and .ppk file i used to use with putty. And finding it difficult to get in. I want to upgrade some code of mine in that.

我已经通过以下链接给出了有关可以做什么的建议。

I've gone through following links giving suggestions as to what can be done.


  1. aws-gaining-ssh-access-to-an-ec2-instance-you-lost-access-to

add-keypair-to-existing-ec2-instance

锁定我自己的根帐户-ec2-ubuntu-instance

ec2-fix-ebs-root

我还有一个约束,即系统的私有i / p地址不应更改。我正在使用的一种软件正在使用系统专用IP地址r许可证。目前,我的实例只有一个卷,是根卷。

I've additional constraint that the private i/p address of system should not change.One of the software I'm using uses system private i/p address for license. And currently my instance has only one volume and is root volume.

基于上面提到的链接,我需要分离卷并附加到其他实例。进行访问所需的更改。并重新附加到原始实例。
但是,由于本例中的卷是根卷,因此我需要停止实例然后分离它。如果我的理解是正确的,这可能会导致实例的私有i / p地址发生更改。

Based on the links mentioned above, I need to detach my volume and attach to other instance. Make required changes for access. And the reattach to original instance. However since the volume in my case is root volume, I need to stop the instance and then detach it. If my understanding is correct, this can cause change in private i/p address of instance.

是否想知道是否可以做些事情?还是遵循链接中提到的步骤是唯一的方法,然后在实例重启时更新软件许可证?

Would like to know if there is some thing that can be done? Or following the steps mentioned in links is the only way and then update s/w license on instance restart?

谢谢

推荐答案

我的建议是:


  1. 拍摄实例快照(创建AMI)

  2. 使用该AMI启动新实例并使用新密钥/对。

  3. 使用弹性IP地址,这样下次就不会更改了。 。或按照user1050134的建议使用VPC。

这篇关于AWS EC2忘记密码并且无法使用SSH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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