1、查看ssh服务是否在运行
systemctl status ssh 
如果没有安装ssh服务,可以通过以下命令安装:
apt install openssh-server 如果服务没有运行,通过以下命令重启ssh服务:
systemctl restart ssh 2、编辑配置文件
vim /etc/ssh/sshd_config 查找并修改以下两个配置:
PermitRootLogin yes ... PasswordAuthentication yes 3、重启ssh服务
systemctl restart ssh