Debian通过SecureCRT进行故障排查的实用流程
一、快速定位思路
二、连通性与服务状态检查
ping <Debian_IP>,确认ICMP可达与时延稳定。traceroute <IP>、nc -vz <IP> 22 或 telnet <IP> 22,验证TCP 22是否可达。sudo systemctl status ssh
sudo systemctl start ssh
sudo systemctl enable ssh
sudo ufw status、sudo ufw allow ssh(或放行22/tcp)。sudo firewall-cmd --list-ports、sudo firewall-cmd --add-port=22/tcp --permanent && sudo firewall-cmd --reload。ssh user@IP 交叉验证,排除SecureCRT特定问题。三、认证与算法兼容性排查
sudo tail -f /var/log/auth.log,从日志中识别拒绝原因(如密钥不匹配、算法不支持、用户不存在)。ls -l ~/.ssh/id_*;如无可用密钥,生成并分发:ssh-keygen -t rsa -b 4096
ssh-copy-id user@<IP>
sudo sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo systemctl restart ssh
echo 'KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1' | sudo tee -a /etc/ssh/sshd_config
sudo systemctl restart ssh
四、会话稳定性与显示问题处理
LANG=en_US.UTF-8 或 zh_CN.UTF-8)。五、高效运维与批量排查建议