Linux configuration IP, remote, authentication, run, rescue, related

Source: Internet
Author: User
Tags get ip

In the router, bridge mode, enter command dhclient auto Get IP

You can modify the configuration file to set your own IP:

Vim/etc/sysconfig/network-scripts/ifcfg-eth0
Bootproto=static #配置静态ipONBOOT =yes #开机启动IPADDR = ipnetmask= Subnet Mask gateway= Gateway

Need to restart Network service after change

Service Network restart

Common Remote Connection tool: Putty Xshell SECURECRT

Virtual Machine window View previous information, with Ls/etc |less


Key Connection server:

Open Puttygen Click Generate to wiggle the mouse and generate the key.

Stick the key in the following file (you need to create the. SSH folder) and modify the permissions to turn off the firewall (two for SELinux and NetFilter (with the Iptables tool))

/root/.ssh/authorized_keyschmod 700/root/.ssh/#目录权限chmod 600/root/.ssh/authorized_keys #文件权限setenforce 0 #关闭sel Inux (temporary) (can view current selinux status with Getenforce) permanently turn off modify/etc/selinux/config change selinux=enforcing to Disabled and restart server iptables-f #临 When you clear the Iptables rule service iptables save #保存规则到系统 (save after clearing the rule, which is equivalent to booting or not booting)

Re-open a putty point to the left of the SSH auth browse to select the saved file just generated key after saving the login with key authentication

View Run Level: RunLevel

Total 7 Run Level 0: Shutdown 1: Single user mode 2: Multiuser mode, no NFS 3: Multiuser mode, NFS 4: Reserved, useless 5: graphical interface 6: Reboot is generally 3 mode

Single-user mode (similar to Safe mode) (Grub password not set)

When you start the 3s countdown, press any key to enter (and then press E to enter edit mode, a to change the kernel options C command-line mode)

Press E To edit select the second line to edit by E. At the end, add the character 1 or S to enter

Then press B to launch into single-user mode

Enter passwd to set a new password and then restart (reboot)

Rescue mode (similar to PE)

Set BIOS preferred boot entry for CDROM boot when you select the third row (rescue installed system) carriage return

Select shell start shell appears command input line

Change root password: chroot/mnt/sysimage #进入原系统 then passwd change Password exit exit restart OK

Reset the BIOS to restore the preferred startup item


Linux configuration IP, remote, authentication, run, rescue, related

Related Article

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.