aileeao / test_ssh.sh
aihuashanying's picture
修复不能push的问题
386b079
raw
history blame contribute delete
492 Bytes
#!/bin/bash
echo "=== 测试 Hugging Face SSH 连接 ==="
echo ""
echo "1. 测试端口 22:"
ssh -T -p 22 [email protected] 2>&1
echo ""
echo "2. 测试端口 443:"
ssh -T -p 443 [email protected] 2>&1
echo ""
echo "3. 当前 SSH 配置:"
if [ -f ~/.ssh/config ]; then
cat ~/.ssh/config | grep -A 5 "Host hf.co" || echo "未找到 hf.co 配置"
else
echo "~/.ssh/config 不存在"
fi
echo ""
echo "4. 可用的 SSH keys:"
ls -la ~/.ssh/*.pub 2>/dev/null || echo "未找到公钥文件"