# posh-ssh-skill **Repository Path**: yxini/posh-ssh-skill ## Basic Information - **Project Name**: posh-ssh-skill - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-16 - **Last Updated**: 2026-03-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # posh-ssh 技能 这是一个用于 PowerShell SSH/SFTP/SCP 工作流的 Codex 技能,基于 **Posh-SSH** 模块。 当任务需要 `New-SSHSession`、`Invoke-SSHCommand`、`Set-SCPItem`、`Get-SCPItem`、SFTP 会话或端口转发时使用此技能,并明确优先 Posh-SSH 而不是 `ssh.exe`/`scp.exe`。 ## 提供的能力 - 指导 Posh-SSH 的会话管理、命令执行、文件传输与端口转发。 - 可靠性建议(凭据处理、主机信任、清理、错误处理)。 - `references/posh-ssh-quickstart.md` 中提供可直接复制的示例。 ## 前置条件 ```powershell Install-Module -Name Posh-SSH -Scope CurrentUser -Force -AllowClobber Import-Module Posh-SSH ``` ## 快速示例 ```powershell $cred = Get-Credential $session = New-SSHSession -ComputerName $Host -Credential $cred -AcceptKey Invoke-SSHCommand -SessionId $session.SessionId -Command "uname -a" Remove-SSHSession -SSHSession $session ``` ## 仓库结构 - `SKILL.md`:技能的核心说明与规则。 - `references/posh-ssh-quickstart.md`:可复制的示例脚本。 - `agents/`:支持性代理配置(如存在)。 ## 备注 更多示例请查看 `references/posh-ssh-quickstart.md`。