1、设置root用户密码
执行命令passwd设置密码
2、apt-get install openssh-server
3、修改sshd_config文件,找到PermitRootLogin 配置项将原先的PermitRootLogin的prohibit-password
修改为yes
vi /etc/ssh/sshd_config
PermitRootLogin yes
PermitEmptyPasswords yes
4、service ssh restart
本文详细介绍了如何在Linux系统中配置SSH服务,使root用户能够通过密码登录。具体步骤包括设置root用户密码、安装openssh-server、修改sshd_config文件以及重启SSH服务。
1、设置root用户密码
执行命令passwd设置密码
2、apt-get install openssh-server
3、修改sshd_config文件,找到PermitRootLogin 配置项将原先的PermitRootLogin的prohibit-password
修改为yes
vi /etc/ssh/sshd_config
PermitRootLogin yes
PermitEmptyPasswords yes
4、service ssh restart