1. 安装openssh-server
```
sudo apt-get install openssh-server
```
2. 查看服务是否开启
```
ps -ef|grep sshd
```
3. 修改配置
```
sudo vi /etc/ssh/sshd_config
```
![](https://img.kancloud.cn/b7/0e/b70eafa9ce6217ba9f1e8bd9b48952b6_299x31.png)
注掉`PermitRootLogin prohibit-password`,增加`PermitRootLogin yes`
4.重启sshd
```
service sshd restart
```