windos openssh踩坑记录

下载地址:
https://github.com/PowerShell/Win32-OpenSSH/releases/tag/V8.6.0.0p1-Beta

管理员权限安装
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
关闭防火墙或者开放端口
netsh advfirewall firewall add rule name=sshd dir=in action=allow protocol=TCP localport=22
开机启动
sc config sshd start= auto
启动服务
net start sshd

报错1:
连接时一直被重置。
windows日志报管理员权限被取消
解决方法:
需要管理员权限安装如何还不行就在c/windows/system32目录下安装

报错2:
我把administrator改名为vpn后使用vpn连接一直报错,需要在计算机右键管理里面用户里面改名才可以。

Guess you like

Origin blog.csdn.net/qq_38595432/article/details/119241936