In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the method of creating root users on EC2 and using root users to log in". In the daily operation, I believe that many people have doubts about the methods of creating root users on EC2 and logging in using root users. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "creating root users on EC2 and using root users to log in". Next, please follow the editor to study!
Today, when I started studying Amazon's cloud host EC2, I encountered a problem. I need to install tomcat on EC2, but the yum command can only be run by root users, and EC2 is logged in as ec2-user users by default, so you need to switch to root users to log in. The research results are published as follows:
1. Log in and connect to the EC2 server according to the method provided on the official website (the official website recommends that windows users use PUTTY connection)
2. Enter the following command to create the password for root:
Sudo passwd root
3. Then you will be prompted to enter new password. Enter a password for the root you want to set, and you need to type it again to verify it.
4. Next, switch to root identity and enter the following command:
Su root
5. Use root identity to edit the ssh login method of Amazon CVM, find PasswordAuthentication no, and change no to yes. Enter:
Vim / etc/ssh/sshd_config
6. Next, to restart sshd, use the following command:
Sudo / sbin/service sshd restart
7. Then switch to root identity
Su root
8. Add the login password to the original "ec2-user". The following command:
Passwd ec2-user
Press the prompt to enter the password twice. At this point, you can log in to EC2's server directly with your root identity.
At this point, the study on "how to create root users on EC2 and log in using root users" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.