AWS cloud host sets the root user to log in with a password

888u

Last update at :2024-05-16,Edit by888u

To be honest, I have used many VPSs over the years, and the one I find most difficult to use is AWS, and it took the longest to install LNMP. At first, I thought it was stuck, and I reinstalled LNMP several times. In the end, I found out that it was slow. It was surprisingly slow. It was a bit speechless. It was slower than the previous chicks with hundreds of MB of memory. It was strange. Let’s talk about logging in again. It’s cumbersome. You have to use a key to log in initially. Moreover, if you pre-install different systems, the default user names are also different. Is it necessary? Then, the root user cannot be used to log in by default, and the key login user has insufficient permissions, which is annoying. . . I had to find a way to modify it myself to make it easier to use, because I am still used to logging in as the root user. 1. Use the key to log in to the system, first change the root user password. sudo passwd root You will then be prompted to enter a new password. Enter a root password you want to set, and then enter it again to confirm. 2. Enter the following command to switch to root identity. su root 3. Use the vim command to modify the /etc/ssh/sshd_config file. For specific vim command usage, please contact Du Niang. vim /etc/ssh/sshd_config Then change the no of PasswordAuthentication no to yes, and then change the forced-commands-only of PermitRootLogin forced-commands-only to yes. If you find that there is a # in front of PermitRootLogin, it means that this item has been commented out, then you need to change it. #remove. Then save and exit. 4. Finally, execute the following command to restart sshd. service sshd restart 5. In this way, you can log in to the system as the root user.

Recommended site search: Mainland China proxy server IP, ICP registration center, server rental, Sichuan virtual host, Ningbo server, instant solution server, host server rental, domain name check, domain name price, shopex virtual host,

AWS cloud host sets the root user to log in with a password

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码