ssh登錄緩慢,使用ssh -v登錄后,顯示在 “pledge: network” 處卡頓:


當登錄一台服務器時,每次輸入密碼之后都要等很久才會得到命令提示符,嘗試修改了sshd_config中的UseDNS no,但效果依然不好。

ssh -v 192.168.12.43

This is probably an issue with D-Bus and systemd. If the dbus service is restarted for some reason, you will also need to restart systemd-logind.
You can check if this is the issue by opening the ssh daemon log (on Ubuntu it should be /var/log/auth.log) and check if it has these lines:
注:CentOS 下查看 

 
cat /var/log/secure

sshd[2721]: pam_systemd(sshd:session): Failed to create session: Connection timed out
如果找到以上信息,則在服務端執行:

systemctl restart systemd-logind
 
完美解決!!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM