原文:win10下Linux子系统开启ssh服务

为了便于交流共同学习,博主QQ群242629020stm32-MCU认认真真交流群) 欢迎批评指导!!!电梯:https://jq.qq.com/?_wv=1027&k=5n1AfYq 

参考:https://www.jianshu.com/p/36440b7df56a

虽然win10自带的bash功能已经很丰富,操作也简便,不过习惯了用xshell, 还是选择用xshell来操作

直接用xshell连接127.0.0.1 端口22 提示连接失败。说明应该是ubuntu的sshd服务设置有问题:

解决方案如下:

安装ssh

sudo apt intsall openssh-server openssh-client

备份sshd配置文件

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak

修改内容:

#PermitRootLogin prohibit-password    #注释
PermitRootLogin yes #添加这行
#StrictModes yes # 注释
PasswordAuthentication yes # 允许密码登录

启动ssh

sudo service ssh start
或者
sudo service ssh restart

如果提示sshd error: could not load host key,则用下面的命令重新生成

sudo rm /etc/ssh/ssh*key
dpkg-reconfigure openssh-server

大功告成

为了便于交流共同学习,博主QQ群242629020stm32-MCU认认真真交流群) 欢迎批评指导!!!电梯:https://jq.qq.com/?_wv=1027&k=5n1AfYq  

win10下Linux子系统开启ssh服务的更多相关文章

  1. 开启win10下Ubuntu子系统的SSH服务

    原文:开启win10下Ubuntu子系统的SSH服务 版权声明:本文为博主原创文章,未经博主允许不得转载. http://blog.csdn.net/zhouzme https://blog.csdn ...

  2. 开启win10下Ubuntu子系统的SSH服务 并设置为开机启动

    Win10中安装Ubuntu子系统后默认是没有开启SSH服务的,需要手动配置开启, 1.先通过 bash 进入子系统修改配置 vi /etc/ssh/sshd_config  备注 输入i 表示键入, ...

  3. Linux服务器开启ssh服务,实现ssh远程登陆!

    最近在学linux,使用ssh远程登陆linux,记录下来! 首先进入/etc目录下,/etc目录存放的是一些配置文件,比如passwd等配置文件,要想使用ssh远程登陆,需要配置/etc/ssh/s ...

  4. windows 子系统 linux wsl 开启ssh 服务

    原因 windows自带的终端操作丑陋,习惯xshell的操作 步骤 1.关闭windows自带的ssh服务,这个占用了22端口 2.wsl 安装ssh服务(使用的是ubuntu) sudo apt ...

  5. Ubuntu下面的docker开启ssh服务

    选择主流的openssh-server作为服务端: root@161f67ccad50:/# apt-get install openssh-server -y Reading package lis ...

  6. [Linux] 启用win10下Linux子系统

    转载请注明出处:https://www.cnblogs.com/lialong1st/p/12004080.html 最新的win10引入了Linux子系统,这样就免去了安装虚拟机或者双系统的麻烦. ...

  7. win10下linux子系统的文件夹的布局

    我这里的目录为:C:\Users\com\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\Loca ...

  8. Linux - Ubuntu开启SSH服务

    SSH分客户端openssh-client和openssh-server. 如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt- ...

  9. kali linux 开启ssh服务

    kali linux 一般默认不开启ssh服务,可使用命令查看ssh服务是否开启 命令:service ssh status 如果显示ssh服务没有开启需要修改ssh配置文件将ssh服务开启,kali ...

随机推荐

  1. 【57.97%】【codeforces Round #380A】Interview with Oleg

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  2. 借助gdb实现pstack

    pstack.sh: #! /bin/sh if [ -z $1 ] then echo "gdb script for print stack" echo "usage ...

  3. Chinese remainder theorem

    https://en.wikipedia.org/wiki/Chinese_remainder_theorem http://planetmath.org/ChineseRemainderTheore ...

  4. java痛苦学习之路[十二]JSON+ajax+Servlet JSON数据转换和传递

    1.首先client须要引入 jquery-1.11.1.js 2.其次javawebproject里面须要引入jar包  [commons-beanutils-1.8.0.jar.commons-c ...

  5. [转载]netcore 使用surging框架发布到docker

    demo运行在windows的docker中,系统是win10,所以需要先下载Docker for Windows,安装完毕后系统会重启,然后桌面上可以找到Docker for Windows的快捷图 ...

  6. Android 用MediaRecorder录制视频太短崩的问题

    具体表现: 调用MediaRecorder的start()与stop()间隔不能小于1秒(有时候大于1秒也崩),否则必崩. 错误信息: java.lang.RuntimeException: stop ...

  7. 解决Centos7 下 root账号 远程连接FTP,vsftpd 提示 530 Login incorrect 问题

    原文:解决Centos7 下 root账号 远程连接FTP,vsftpd 提示 530 Login incorrect 问题 三步走: 1.vim /etc/vsftpd/user_list 注释掉 ...

  8. 【前端统计图】hcharts实现堆叠柱形图(与后台数据交互)

    原型图类似如下: 图片.png <!DOCTYPE > <html> <head> <meta charset="utf-8">&l ...

  9. 【84.62%】【codeforces 552A】Vanya and Table

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  10. Qt 学习: 视图选择 (QItemSelectionModel)

    博主QQ:1356438802 选择是视图中经常使用的一个操作.在列表.树或者表格中,通过鼠标点击能够选中某一项,被选中项会变成高亮或者反色.在 Qt 中,选择也是使用了一种模型.在 model/vi ...