Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-ec2启动root登录 #26

Open
kuuyee opened this issue Apr 20, 2016 · 0 comments
Open

aws-ec2启动root登录 #26

kuuyee opened this issue Apr 20, 2016 · 0 comments
Assignees

Comments

@kuuyee
Copy link
Owner

kuuyee commented Apr 20, 2016

1. 根据官网提供的方法登录连接到EC2服务器

2. 创建root的密码,输入如下命令:

sudo passwd root

3.然后会提示你输入new password。输入一个你要设置的root的密码,需要你再输入一遍进行验证。

4.接下来,切换到root身份,输入如下命令:

su root

5.使用root身份编辑亚马逊云主机的ssh登录方式,找到 PasswordAuthentication no,把no改成yes。输入:

vim /etc/ssh/sshd_config

6.接下来,要重新启动下sshd,如下命令:

sudo /sbin/service sshd restart

7.然后再切换到root身份

su root

8.再为原来的”ec2-user”添加登录密码。如下命令:

passwd ec2-user

9.按提示,两次输入密码。到此可以用root身份直接登录EC2的服务器了。

@kuuyee kuuyee self-assigned this Apr 20, 2016
@kuuyee kuuyee added this to the 云平台建设前期 milestone Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant