1. 首先问题可能出现在网络上,,ping一下ip看是否能ping通
2. 检查防火墙是否开启,如果必须开启请检查防火墙是否开启22端口(软件默认使用22端口进行ssh连接)
3. 检查ssh是否启动 `./etc/init.d/ssh status`
4. 检查账号密码是否正确,普通用户应该对应home下的文件夹的名字,如我的是wps

5. 配置文件原因
- root用户不能远程连接问题
```vim /etc/ssh/sshd_conf```
- 设置登录时不输入,两分钟后会报错问题
```
LoginGraceTime 0
PermitRootLogin yes
```

6.修改服务器中`/etc/ssh/sshd.config `文件,将`LoginGraceTime的值设为0`,默认为120,`TCPKeepAlive 设为yes`, 然后使用重启sshd服务,这样就可以了。
7.以上问题还是不能解决时,有可能和我一样都是用apt-get install安装了最新的ssh,设置都变样了,6.都找不到所以滑轮滚到配置文件的最后,把这个改了,置于为什么翻译一下上面这个英文就行
`UsePAM no`

# **注意**
以上所有操作都需要重启ssh
```
/etc/init.d/ssh restart
或者
service ssh restart
```