修改端口

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2021-05-31
  • 2021-10-29
  • 2021-08-09
  • 2021-12-18
  • 2021-09-09
猜你喜欢
  • 2021-11-21
  • 2020-06-09
  • 2021-09-28
  • 2021-12-24
  • 2021-07-03
  • 2021-10-22
  • 2021-10-15
相关资源
相似解决方案