首先须要查看是否安装ssh,若是没有,输入如下命令安装ssh
sudo apt-get install openssh-server
进入/etc/ssh/sshd_config文件rest
vi /etc/ssh/sshd_config
将PermitRootLogin prohibit-password 改成 PermitRootLogin yes而后重启ssh服务code
PermitRootLogin prohibit-password
PermitRootLogin yes
/etc/init.d/ssh restart