[root@server ~]# vim /etc/chrony.conf
[root@server ~]# vim /etc/chrony.conf
[root@server ~]# systemctl restart chronyd
[root@server ~]# chronyc sources -v
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current best, '+' = combined, '-' = not combined,
| / 'x' = may be in error, '~' = too variable, '?' = unusable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? 203.107.6.88 2 6 3 2 -5684us[-5684us] +/- 26ms
[root@server ~]# timedatectl status
Local time: 二 2023-03-21 20:58:25 CST
Universal time: 二 2023-03-21 12:58:25 UTC
RTC time: 二 2023-03-21 12:58:25
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
[root@server ~]# date
2023年 03月 21日 星期二 20:58:38 CST
[root@server ~]# vim /etc/chrony.conf
[root@server ~]# systemctl restart chronyd
[root@node ~]# vim /etc/chrony.conf
[root@node ~]# systemctl restart chronyd
[root@node ~]# systemctl restart chronyd
[root@node ~]# chronyc sources -v
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current best, '+' = combined, '-' = not combined,
| / 'x' = may be in error, '~' = too variable, '?' = unusable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.168.111.128 3 6 17 18 -30us[ +108us] +/- 24ms
[root@node ~]# timedatectl status
Local time: 二 2023-03-21 23:11:09 CST
Universal time: 二 2023-03-21 15:11:09 UTC
RTC time: 二 2023-03-21 15:11:09
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
[root@node ~]# date
2023年 03月 21日 星期二 23:11:14 CST
[root@node1 ~]# useradd t1
[root@npde1 ~]# passwd t1
更改用户 t1 的密码 。
新的密码:
无效的密码: 密码少于 8 个字符
重新输入新的密码:
passwd:所有的身份验证令牌已经成功更新。
[t1@node1 root]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/redhat/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/redhat/.ssh/id_rsa
Your public key has been saved in /home/redhat/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:peN3IXp4nusrQ5Ca/umHNzX6fO6SPJSSf6LCnv2mNc8 redhat@node1
The key's randomart image is:
+---[RSA 3072]----+
| |
| |
| . . |
| o o |
| o .S.... |
| o .++=. . |
| . . o+B*o. |
| . ++BBO*o |
| +*++@X@E |
+----[SHA256]-----+
[t1@node1 root]$
[t1@node1 root]$ ssh-copy-id [email protected]
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/redhat/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
[email protected]'s password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '[email protected]'"
and check to make sure that only the key(s) you wanted were added.
[t1@node1 root]$ ssh [email protected]
Activate the web console with: systemctl enable --now cockpit.socket
Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Sat Mar 18 19:58:18 2023 from 192.168.38.136
[root@server ~]#
切换完成