win10 子系统 Ubuntu 配置openssh

1、安装openssh-server

apt-get install openssh-server

2、启动openserver 

service ssh start

3、win10 子系统 Ubuntu端口22 被占用,修改配置文件

nano /etc/ssh/sshd_config

# What ports, IPs and protocols we listen for

Port 23   #改为23

# Use these options to restrict which interfaces/protocols sshd will bind to

#ListenAddress ::

ListenAddress 0.0.0.0  #去掉注释#

UsePrivilegeSeparation yes  #改为yes

4、启动openssh-service

service ssh start

如果显示sshd error: could not load host key,则使用

rm /etc/ssh/ssh*key

dpkg-reconfigure openssh-server

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容