win10 子系统 Ubuntu 配置openssh

2017-11-20  本文已影响0人  惊穹

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

上一篇 下一篇

猜你喜欢

热点阅读