Basic Linux security problems

Source: Internet
Author: User


I. Linux cracked the root password. I installed centos on the VM today, but didn't prompt me to enter the password. I couldn't enter the system without the root password.
Solution: 1. Restart 2. Press e3 when the graphic interface appears, select line 3, and select kenel ........................ Press e to enter the editing mode. Add a space at the end and enter 1 such as: kernel/boot/vmlinux =/1 and press enter to exit www.2cto.com 7.) in Item 2, press B, and enter the following link: /usr/sbin/passwd enter the new root password twice.
2. I have read many articles about SSH and password-free logon. I don't think it is difficult to operate, but I can't remember how to find it every time. Now I have recorded it here, convenience in the future:
Step1. a $ ssh-keygen-t rsa one way press ENTER step2. a $ scp ~ /. Ssh/id_rsa.pub B :~ //. Ssh/a. pub // enter the password step3. B $ cat ~ /. Ssh/a. pub> ~ /. Ssh/authorized_keys success. Then, when using machine a to copy files to machine B, you do not need to enter the password. The author chen3888015

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.