xshell连接windows10子系统ubuntu


修改端口

cd /etc/ssh
#备份
sudo cp sshd_config sshd_config.bak
sudo vim sshd_config

修改sshd_config

Port 2233 #修改端口

ListenAddress 0.0.0.0 #打开本地监听
#StrictModes yes #注释掉
PasswordAuthentication yes #允许密码登陆


重启ssh

sudo service ssh restart

 

重新生成host key

sudo dpkg-reconfigure openssh-server

完成

问题:关了bash会断线

https://github.com/Microsoft/WSL/issues/612

原文链接:https://blog.csdn.net/anychenp/article/details/78922320


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM