備份文件
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
編輯文件
vi /etc/ssh/sshd_config
輸入/
查找GSSAPIAuthentication
設置如下
GSSAPIAuthentication no # 是否允許使用基于 GSSAPI 的用戶認證。默認值為"no"。僅用于SSH-2
詳細解釋
輸入/
查找UseDNS
設置如下
UseDNS no # yes 開啟的作用是防止客戶端欺騙
詳細解釋
重啟ssh服務
systemctl restart sshd
親測有效
原文鏈接:解決ssh登錄linux速度慢的問題(以centos7為例)