1.13 单用户模式
1.14 救援模式
1.15 克隆虚拟机

1.16 Linux机器相互登录

单用户模式

重启linux-----init 6,reboot  ,shutdown -r now

重启系统,3秒内按向下的方向键,

2017-10-19 1周4次课

按方向键移动光标定位在第一行,按字母e编辑它

2017-10-19 1周4次课

按向下的方向键移动到linux16开头的行

2017-10-19 1周4次课

按方向键移动到ro这里,将ro改为rw init=/sysroot/bin/sh

2017-10-19 1周4次课

然后同时按ctrl和x ,进入emergency模式

2017-10-19 1周4次课

修改root密码,首先切换到原始系统,再修改密

2017-10-19 1周4次课


再重启系统

2017-10-19 1周4次课



救援模式
光盘启动 ---光驱开机是否开机启动
2017-10-19 1周4次课

2017-10-19 1周4次课


2017-10-19 1周4次课

2017-10-19 1周4次课

2017-10-19 1周4次课



选择1,回车,在回车

2017-10-19 1周4次课




克隆虚拟机

2017-10-19 1周4次课2017-10-19 1周4次课



1.16 Linux机器相互登录
[[email protected] ~]# ssh-******
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
af:3a:01:0e:37:f8:08:27:ee:57:37:48:06:96:f4:73 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
|  ...            |
|  +.            |
|  ...o E        |
|o + +oo          |
|.+ *oo. S        |
| .. oo.o .      |
|.  . ... .      |
| . .  .  .      |
|  .  .o.        |
+-----------------+
[[email protected] ~]# ls /root/.ssh/
authorized_keys  id_rsa  id_rsa.pub
[[email protected] ~]# cat /root/.ssh/id_rsa.pub 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD4qId3iYQemk8ZgUCKnUAE/OE964h/Rd9uAGxbqtuVEwiDXfHLO3Ajdssp2xu2gSRSIvATWnkFzJA7yF52f+dSwTfqpTWu6jWpZLajVdcot54k7sp0cNhczYrJ8JXifG5gLmPXBtFJNhP6hsr6jxfIyp69QnZ1mxuPZj4gNs116GTE0vKq/jB8gvbO1DxJEQzmvSP5J5sT8aI0tjNAVaQe11P7wCLv4eg5057R5ys/yvgMWxpBt/3s/6y7xgEnifN4W1xNiV2FY2mlBIr2B0KzPjHZcLZS94BMo1U6l8SlpftUq/DMxoqKsd9KlkypJOhAUPCaLSqxiwE1x2FVrPlp [email protected]

[[email protected] ~]# vi /root/.ssh/authorized_keys 


Connection to 192.168.79.128 closed.
[[email protected] ~]# ssh 192.168.79.128
Last login: Fri Oct 20 09:23:50 2017 from 192.168.79.129
[[email protected] ~]# 

通过这个办法,可以实现两台主机相互登陆 


相关文章: