操作
バグ #320
未完了SSH-1: 接続管理・node-ssh統合 (4h)
ステータス:
新規
優先度:
高め
担当者:
-
開始日:
2025-06-07
期日:
進捗率:
0%
予定工数:
説明
SSH接続管理とnode-sshライブラリ統合を実装する。
実装内容¶
SSH接続マネージャー¶
export class SSHManager {
private connections: Map<string, NodeSSH> = new Map();
private redis: Redis;
private async getConnection(userId: string, host: string): Promise<NodeSSH> {
const key = `${userId}:${host}`;
if (!this.connections.has(key)) {
const ssh = new NodeSSH();
const config = await this.getHostConfig(host);
await ssh.connect({
host: config.host,
username: config.username,
privateKey: config.privateKey
});
this.connections.set(key, ssh);
}
return this.connections.get(key)!;
}
}
ホスト設定管理¶
- SSH鍵設定読み込み
- ホスト別接続情報管理
- 接続プール管理
- エラーハンドリング
成果物¶
- SSH接続管理クラス
- 接続プール実装
- ホスト設定管理
作業時間: 4時間¶
表示するデータがありません
操作