win10子系统ubuntu开启ssh登陆

安装ssh

apt-get install openssh-server

备份sshd配置文件

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

修改sshd_config
port 22改为2222
PasswordAuthentication 改为yes
添加
AllowUsers zifu.ltd 改为你的用户名

开启ssh
service ssh start

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

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

摘自:http://www.manongjc.com/detail/51-lgkrxokarhqqmtx.html

取消

感谢您的支持,我会继续努力哒!

扫码打赏
支付金额随意哦!

打开支付宝扫一扫,即可进行扫码打赏哦

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注