对于经常用惯linux做为线上项目运行环境的人来说,突然给弄一个windows生产环境会觉得一下以前做的可持续交付没办法用了,这个时候可以使用windows上安装openssh来实现使用ssh管理windows服务器。
windows服务器安装openssh微软官方介绍文章:
https://learn.microsoft.com/zh-cn/windows-server/administration/openssh/openssh_install_firstuse
但是微软官方的文章我测试在windows server2019上有问题,我才用直接安装openssh安装的方式。
1首先去github下载openssh安装包
https://github.com/PowerShell/Win32-OpenSSH/releases
这里我们选择自己对应操作系统的32位或者64位安装包

2解压安装
解压后如下:

在目录下运行:
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
出现如下界面安装成功:

3启动服务
net start sshd
成功如图所示

Leave a Reply