允许root用户ssh登陆 vim /etc/ssh/sshd_config 把PermitRootLogin后面的删了,改成yes即可。 service sshd restart passwd root Ubuntu 默认不带ssh,要先安装 sudo apt install openssh-server 重启ssh服务 sudo systemctl restart sshd