linux系统debian10开启使用root用户登录ssh简明方法

使用普通用户先登录

输入命令 su-

切换用户

root@xxff:/$ su –
password:

修改配置文件,需要改动下面两个地方
vi /etc/ssh/sshd_config

使用root用户登录
PermitRootLogin yes

允许密码登录
PasswordAuthentication yes

修改完之后,最后使用:wq 保存即可

重启服务

/etc/init.d/ssh restart

- 1605923424 5d518828ff221e1

THE END