如何设置Ubuntu的远程连接root
1.切换成root
sudo -i
1.5 设置个root密码
passwd
2.进入nano /etc/ssh/sshd_config
nano /etc/ssh/sshd_config
3.修改这个位置
PermitRootlogin yes
4.保存
ctrl+x
5.确定
y
6.回车
enter
7.效果
结果:
Ubuntu2004和Ubuntu2204都成功了
实验--练习
练习:
1、显示当前时间,格式:2016-06-18 10:20:30
[11:40:00 root@localhost ~][#date +'%F %T'
2024-02-23 11:40:26
2、显示前天是星期几
[11:43:16 root@localhost ~][#date -d '-2 day' +'%F %T'
2024-02-21 11:43:47
#其中-2就是昨天 所以它显示的是昨天
3、设置当前日期为2019-08-07 06:05:10
date -s "20190807 06:05:10"
标签:11,10,06,43,实验,date,root
From: https://www.cnblogs.com/nwq1101/p/18030405