编辑ssh的配置文件默认 vim /etc/ssh/sshd_config
PermitRootLogin yes
yes表示允许root远程登录

no表示禁止root远程登录

重启服务
service sshd restart