新安装的ubuntu18.04系统无法用xshell远程连接问题

1.ubuntu 18.04系统默认是普通用户登录,首先设置root密码

sudo passwd

2.安装openssh-server

apt install openssh-server -y

如果出现报错,请参考下图解决即可

 3.修改配置文件/etc/ssh/sshd_config

插入一行配置:

  PermitRootLogin yes

4.重启sshd

systemctl restart sshd

原文地址:https://www.cnblogs.com/new-journey/p/13130255.html