XShell初次连接WSL2教程
站内热度 站内前 27%
3万 次浏览
1、先删ssh,再安装ssh
sudo apt-get remove --purge openssh-server ## 先删ssh
sudo apt-get install openssh-server ## 在安装ssh
sudo rm /etc/ssh/ssh_config ## 删配置文件,让ssh服务自己想办法链接
sudo service ssh --full-restart
2、修改配置文件
sudo vim /etc/ssh/sshd_config
Port 6666
ListenAddress 0.0.0.0
PasswordAuthentication yes
3、重启ssh(每次重启wsl都要执行该语句)
sudo service ssh --full-restart
4、重新生成host key
sudo dpkg-reconfigure openssh-serve
5、连接XShell
相关文档
评论与补充0
有问题或想补充的,写在下面 · 选中正文文字再点「报告错误」会自动引用还没有评论。有疑问、补充,或者发现错字,都可以写在下面。