REM 安装
powershell install-sshd.ps1
REM 重启服务
sc stop sshd
sc start sshd
配置
notepad "%ProgramData%\ssh\sshd_config"
# 修改服务端口
Port 2222# 密钥登录
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
# 禁用密码登录
PasswordAuthentication no
# 注释掉默认授权文件位置# Match Group administrators# AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys