美文网首页
win10 子系统 Ubuntu 配置openssh

win10 子系统 Ubuntu 配置openssh

作者: 惊穹 | 来源:发表于2017-11-20 11:38 被阅读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

相关文章

网友评论

      本文标题:win10 子系统 Ubuntu 配置openssh

      本文链接:https://www.haomeiwen.com/subject/gmxvvxtx.html