debian9 配置ssh 允许 root直接远程登录

1,安装ssh-service

apt install ssh

2,修改配置文件目录

nano /etc/ssh/sshd_config

3,修改如下

PermitRootLogin yes

4,重启服务

systemctl restart ssh

Ubuntu 16.04使用root 帐号开启 SSH 登录

1.默认使用ubuntu用户登录,密码为服务器配置时设置的密码,可在重置密码中修改

2.修改 root 密码

sudo passwd root

3.修改配置文件

sudo vi /etc/ssh/sshd_config

# Authentication:
LoginGraceTime 120
#PermitRootLogin prohibit-password
PermitRootLogin yes
StrictModes yes

4.重启ssh

sudo service ssh restart