标签:root密码 相互登录
单用户模式[root@localhost ~]# ls -l /usr/lib/systemd/system/runlevel*target
lrwxrwxrwx. 1 root root 15 5月 28 18:48 /usr/lib/systemd/system/runlevel0.target -> poweroff.target ###关机
lrwxrwxrwx. 1 root root 13 5月 28 18:48 /usr/lib/systemd/system/runlevel1.target -> rescue.target ###单用户
lrwxrwxrwx. 1 root root 17 5月 28 18:48 /usr/lib/systemd/system/runlevel2.target -> multi-user.target ###多用户
lrwxrwxrwx. 1 root root 17 5月 28 18:48 /usr/lib/systemd/system/runlevel3.target -> multi-user.target ###多用户
lrwxrwxrwx. 1 root root 17 5月 28 18:48 /usr/lib/systemd/system/runlevel4.target -> multi-user.target ###多用户
lrwxrwxrwx. 1 root root 16 5月 28 18:48 /usr/lib/systemd/system/runlevel5.target -> graphical.target ###图像界面
lrwxrwxrwx. 1 root root 13 5月 28 18:48 /usr/lib/systemd/system/runlevel6.target -> reboot.target ###重启
先用虚拟机克隆一个虚拟机,不用完全克隆。
配置克隆机的ip地址
修改hostname:这个命令是直接改的配置文件/etc/hostname
[root@aminglinux-02 ~]# ssh-keygen 配置密钥
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:
79:cd:12:34:d1:54:c0:58:de:38:52:7e:eb:d4:61:6d root@aminglinux-02
The key‘s randomart image is:
+--[ RSA 2048]----+
| +B=o. |
| ..=oo .|
| o = ooE|
| . = o.+.|
| S o o o .|
| . . o |
| . |
| |
| |
+-----------------+
[root@aminglinux-02 ~]# ls /root/.ssh/
authorized_keys id_rsa id_rsa.pub known_hosts
连接aminglinux-01
[root@aminglinux-02 ~]# getenforce 查看selinux状态
Enforcing 开启
[root@aminglinux-02 ~]# setenforce 0 临时关闭
[root@aminglinux-02 ~]# getenforce
Permissive 关闭
标签:root密码 相互登录
原文地址:http://blog.51cto.com/akui2521/2089611