服务器端sshd配置文件 /etc/ssh/sshd_config 看是否有如下的两条配置条目
GSSAPIAuthentication no
UseDNS no
如果前面带#,请把#删掉,或者新添加入这样两行。
然后重启sshd服务,或者重启服务器也可以。
查看状态:
systemctl status sshd.service
启动服务:
systemctl start sshd.service
重启服务:
systemctl restart sshd.service
开机自启:
systemctl enable sshd.service