feat: SSH直连密钥生成器 + 公钥部署SG-001/GZ-006 + 代理新增小云雀/LLM端点
- 新增 generate-ssh-key.py (Ed25519密钥对生成脚本) - 公钥已部署 SG-001 + GZ-006: authorized_keys - SSH直连验证通过: 两台服务器22端口通 - 代理新增: xiaoyunque_image/script + volcano_chat (LLM对话) - 小云雀底层模型确认: 图片=doubao-seedream-4-0 ✅ 剧本=doubao-seed-2-1-pro ✅
This commit is contained in:
parent
1c4353d198
commit
accb6e4bdc
@ -38,6 +38,30 @@ ENDPOINTS = {
|
||||
"auth_prefix": "Bearer ",
|
||||
"description": "火山即梦生图3.0 · model: doubao-seedream-4-0-250828 ✅ · size≥1920×1920",
|
||||
},
|
||||
# ── 小云雀 · 图片生成(短剧漫剧配图)──
|
||||
"xiaoyunque_image": {
|
||||
"url": "https://ark.cn-beijing.volces.com/api/v3/images/generations",
|
||||
"key_name": "VOLCANO_JIMENG_API_KEY",
|
||||
"auth_header": "Authorization",
|
||||
"auth_prefix": "Bearer ",
|
||||
"description": "小云雀短剧漫剧图片生成 · model: doubao-seedream-4-0-250828 ✅ · size≥1920×1920",
|
||||
},
|
||||
# ── 小云雀 · 剧本解析(短剧漫剧文本理解)──
|
||||
"xiaoyunque_script": {
|
||||
"url": "https://ark.cn-beijing.volces.com/api/v3/chat/completions",
|
||||
"key_name": "VOLCANO_JIMENG_API_KEY",
|
||||
"auth_header": "Authorization",
|
||||
"auth_prefix": "Bearer ",
|
||||
"description": "小云雀短剧漫剧剧本解析 · model: doubao-seed-2-1-pro-260628 ✅ / doubao-seed-2-1-turbo-260628 / doubao-seed-2-0-pro-260215",
|
||||
},
|
||||
# ── 火山方舟 · LLM 对话/文本(通用)──
|
||||
"volcano_chat": {
|
||||
"url": "https://ark.cn-beijing.volces.com/api/v3/chat/completions",
|
||||
"key_name": "VOLCANO_JIMENG_API_KEY",
|
||||
"auth_header": "Authorization",
|
||||
"auth_prefix": "Bearer ",
|
||||
"description": "火山LLM对话 · doubao-seed-2-1-pro ✅ / doubao-seed-2-1-turbo / doubao-seed-2-0-pro / deepseek-v4-pro / qwen3-32b / glm-5-2",
|
||||
},
|
||||
# ── 火山方舟 · Seedream 4.5 ──
|
||||
"volcano_seedream": {
|
||||
"url": "https://ark.cn-beijing.volces.com/api/v3/images/generations",
|
||||
|
||||
86
zero-point/core-channel/ssh-direct/generate-ssh-key.py
Normal file
86
zero-point/core-channel/ssh-direct/generate-ssh-key.py
Normal file
@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
光湖语言系统 · SSH 密钥生成器
|
||||
Guanghu Language System · SSH Key Generator
|
||||
|
||||
用途: 在本地生成 SSH 密钥对 → 公钥部署到服务器 → 私钥存入保险库
|
||||
一次生成 · 多服务器共用 · 替代 Gatekeeper HTTP 拐弯
|
||||
|
||||
用法: python3 generate-ssh-key.py
|
||||
"""
|
||||
|
||||
import os, subprocess, sys
|
||||
from pathlib import Path
|
||||
|
||||
KEY_DIR = Path.home() / ".guanghu" / "ssh"
|
||||
KEY_NAME = "guanghu_direct"
|
||||
KEY_PATH = KEY_DIR / KEY_NAME
|
||||
PUB_PATH = KEY_DIR / f"{KEY_NAME}.pub"
|
||||
|
||||
|
||||
def run():
|
||||
print("=" * 60)
|
||||
print(" 光湖语言系统 · SSH 密钥对生成")
|
||||
print("=" * 60)
|
||||
|
||||
# 1. 创建目录
|
||||
KEY_DIR.mkdir(parents=True, exist_ok=True)
|
||||
os.chmod(KEY_DIR, 0o700)
|
||||
|
||||
# 2. 检查是否已存在
|
||||
if KEY_PATH.exists():
|
||||
ans = input(f"\n⚠️ {KEY_PATH} 已存在,覆盖?[y/N] ")
|
||||
if ans.lower() != "y":
|
||||
print("→ 跳过,使用已有密钥")
|
||||
show_keys()
|
||||
return
|
||||
|
||||
# 3. 输入密码(用于加密私钥,和保险库同一个密码)
|
||||
print("\n🔐 输入保险库密码(用于加密私钥):")
|
||||
pw = input(" 密码: ").strip()
|
||||
if not pw or len(pw) < 8:
|
||||
print("❌ 密码至少8位")
|
||||
sys.exit(1)
|
||||
|
||||
# 4. 生成 Ed25519 密钥对
|
||||
print(f"\n🔑 生成 Ed25519 密钥对...")
|
||||
result = subprocess.run([
|
||||
"ssh-keygen",
|
||||
"-t", "ed25519",
|
||||
"-f", str(KEY_PATH),
|
||||
"-N", pw, # 用密码加密私钥
|
||||
"-C", "guanghu-direct-ssh"
|
||||
], capture_output=True, text=True)
|
||||
|
||||
if result.returncode != 0:
|
||||
print(f"❌ 生成失败: {result.stderr}")
|
||||
sys.exit(1)
|
||||
|
||||
os.chmod(KEY_PATH, 0o600)
|
||||
os.chmod(PUB_PATH, 0o644)
|
||||
|
||||
# 5. 显示结果
|
||||
print(f"\n✅ 密钥对生成成功!\n")
|
||||
print(f" 私钥: {KEY_PATH}")
|
||||
print(f" 公钥: {PUB_PATH}")
|
||||
print()
|
||||
|
||||
show_keys()
|
||||
|
||||
|
||||
def show_keys():
|
||||
"""显示公钥内容"""
|
||||
pub = PUB_PATH.read_text().strip()
|
||||
print(f"📤 公钥(发给我部署到服务器):\n")
|
||||
print(f" {pub}")
|
||||
print(f"\n --- 复制上面这行发给我 ---")
|
||||
print()
|
||||
print(f"📥 私钥位置: {KEY_PATH}")
|
||||
print(f" (留在本地,不要发给任何人)")
|
||||
print()
|
||||
print(f"🔐 连接服务器:")
|
||||
print(f" ssh -i {KEY_PATH} root@<服务器IP>")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
Loading…
x
Reference in New Issue
Block a user