记一次22端口登录卡顿 排查

Posted by bfpiaoran on November 19, 2018

博客莫名其妙链接的特别慢

找公司运维大佬帮忙调试下

ssh 123.xxx.248.xx -vvv

debug1: pledge: network卡了好久

 

查了圈百度 没解决

 

从服务端调试

 

cp /etc/ssh/sshd_config /tmp/sshd_config
vim /tmp/sshd_config
端口改一下,保存退出
/usr/sbin/sshd -f /tmp/sshd_config -d

 

但从ssh log中发现大量爆破的日志

 

最后翻了下serverfault的帖子

https://serverfault.com/questions/792486/ssh-connection-takes-forever-to-initiate-stuck-at-pledge-network

echo “” > /var/log/btmp即可

 

因为大量爆破的日志 使btmp数量巨大而导致登录卡顿