Ubuntu 22.04 root直接登录设置

Ubuntu 22.04 root直接登录设置

1.安装openssh-server软件包
1.1 apt update
1.2. apt install openssh-server

3.编辑 /etc/ssh/sshd_config,修改下面2个参数值
PermitRootLogin yes
PasswordAuthentication yes

4.重启ssh服务
systemctl restart sshd

5.修改时间,修改时区时间,为上海时区时间
timedatectl set-timezone Asia/Shanghai
后面就可以直接root登录系统。

你可能感兴趣的:(运维,ubuntu)