Windows 安装 OpenSSH

发布时间 2023-08-21 15:29:47作者: SpringCore

官方介绍地址:https://learn.microsoft.com/zh-cn/windows-server/administration/openssh/openssh_install_firstuse

安装方式

1.使用设置 -> 应用进行安装

image

image

image

2.使用PowerShell 安装 OpenSSH

1.查看安装情况
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'

image

2.根据需要安装服务器或客户端组件
# 安装 OpenSSH 客户端
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

# 安装 OpenSSH 服务端
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

启用