Ubuntu18.04,出于安全预防措施,ssh 禁止 root 登陆
安装
安装 openssh-server
sudo apt install openssh-server
安装 ssh 客户端
sudo apt install ssh
修改配置文件
修改 /etc/ssh
下的 sshd_config
将其中
去掉注释,并且把 prohibit-password
改为 yes
,变完之后如下:
PermitRootLogin yes
重启 ssh 服务
sudo systemd restart sshd