win10安装Ubuntu,用Xshell连接


一、安装Ubuntu

安装Ubuntu,安装过程就不详细说了,我是从微软商店下载的Ubuntu安装,没有用VMware,想用Xshell连接Ubuntu,中间一直出问题,现在解决,总结一下。

二、配置ssh server

自带ssh server不好用,先卸载再安装即可

// 卸载
sudo apt-get remove openssh-server
// 安装
sudo apt-get install openssh-server

三、编辑配置文件

vim /etc/ssh/sshd_config

修改端口:

  Port 36000  # 默认的是22,但是windows有自己的ssh服务用的也是22端口,修改一下
  #还有一项PasswordAuthentication
  # 改为yes可以使用密码登录,ssh密钥登录使用默认no
  PasswordAuthentication yes

四、重启服务

sudo service ssh --full-restart

五、查看ip

ifconfig

六、Xshell连接

然后输入用户名密码就🆗啦!!!

问题记录:

错误:

Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success

运行:

sudo rm -rf /etc/apt/apt.conf.d/20snapd.conf

 

https://www.jianshu.com/p/039411d2c1f6

https://nowtime.cc/linux/683.html


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM