CentOS 上 SFTP 传输慢 通常由以下几类原因导致,按出现频率从高到低说明:
✅ 排查:
ping 目标IP
mtr 目标IP
iperf3 -c 目标IP
aes-256-ctr + hmac-sha2-256UseDNS yes,连接时卡顿✅ 优化 /etc/ssh/sshd_config:
UseDNS no
GSSAPIAuthentication no
Ciphers aes128-ctr,aes192-ctr,aes256-ctr
重启:
systemctl restart sshd
df -h
df -i
✅ 测试磁盘:
dd if=/dev/zero of=test bs=1M count=500 oflag=direct
top
free -h
✅ 替代方案:
rsync(支持增量、压缩)scp -Ctar czf file.tgz dir/
✅ 临时测试:
setenforce 0
ping / mtr → 网络top / df / dd → 系统 & 磁盘sshd_config → SSH 优化rsync 测试 → 协议问题如果你愿意,可以告诉我:
我可以帮你精准定位。