合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
# **Shell客户端初次连接WSL2教程** 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 vi /etc/ssh/sshd_config.d/my_ssh.conf #添加如下内容 Port 666 ListenAddress 0.0.0.0 PasswordAuthentication yes ~~~ 3、重启ssh(每次重启wsl都要执行该语句) ~~~ sudo service ssh --full-restart ~~~ 4、重新生成host key ~~~ sudo dpkg-reconfigure openssh-server ~~~