BrewUI:给Homebrew一个可视化操作台,让包管理不再依赖命令行
2026/9/19 9:53:28
本文整理了 Xshell SSH 典型故障排查指南,涵盖连接超时、连接被拒绝、密码和密钥认证失败、算法兼容性等常见问题,并提供详细排查步骤和解决方法。
ping服务器IPtraceroute服务器IPsystemctl status sshdss -lntp|grep22firewall-cmd --list-all iptables -L -nsystemctl start sshdfirewall-cmd --add-service=ssh --permanent && firewall-cmd --reloadcat/etc/ssh/sshd_config|grepPort systemctl restart sshd/etc/hosts.allow和/etc/hosts.deny是否限制passwd-S 用户名# 查看账号状态cat/etc/ssh/sshd_config|grepPermitRootLoginpasswd -u 用户名vim/etc/ssh/sshd_config PermitRootLoginyessystemctl restart sshd~/.ssh/authorized_keyschmod700~/.sshchmod600~/.ssh/authorized_keys.pem或 Xshell 生成的.keyssh-vvv 用户名@服务器IP# 查看详细连接日志可帮助定位认证失败的具体原因(密钥不匹配、权限错误等)
diffie-hellman-group1-sha1或其他兼容算法echo'UseDNS no'>>/etc/ssh/sshd_config systemctl restart sshdssh -vvv查看调试信息SSH 连接故障排查应遵循网络 → 服务 → 用户认证 → 客户端配置的顺序,逐层排查,可快速解决大部分 Xshell 连接异常问题。