Windows的Linux子系统上配置SSH服务器
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 安装openssh 这个不用啰嗦太多,首先需要安装 openssh-server 和 openssh-client 。 修改 sshd-config 配置 需要关注的就是这三行。 UsePrivilegeSeparation no #因为wsl没有实现chroot PasswordAuthentication yes ListenAddress 0.0.0.0 #这一项在我的发行版里缺省为注释行。 其他的可以根据需求修改。 ListenAddress 0.0.0.0 # 要让其他计算机能连接上需要加上这一行,或者把经常需要连接的计算机IP加入 PermitRootLogin yes # 允许root用户登录。 关闭Windows自带的ssh 我原本还不知道的,查了资料才知道新版Windows自带了ssh服务,不过怎么使用还没有了解。 可以使用powershell来查看这个服务。 PS C:\Users\user> Get-Service -Name ssh* Status Name DisplayName ------ ---- ----------- Stopped SshBroker SSH Server Broker Stopped SshProxy SSH Server Proxy