最后更新于4年前
[wsl2] memory=6GB swap=0 localhostForwarding=true
打开 任务管理器 -> 服务,重启LxssManager服务
重装openssh-server
sudo apt-get remove openssh-server sudo apt-get install openssh-server
配置sshd
# 修改端口不与宿主机冲突 Port 2222 # 允许使用密码认证方式登录 PasswordAuthentication yes
重启sshd
sudo service ssh --full-restart
在windows宿主机上测试连接
ssh 127.0.0.1 2222