win10安装ubuntu子系统常见问题解决方案
问题1:ssh启动后出错
错误内容:
# service ssh start *Restarting OpenBSD Secure shell server sshd Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_ecdsa_key Could not load host key: /etc/ssh/ssh_host_ed25519_key
解决方案:
# ssh-keygen -A ssh-keygen: generating new host key: RSA DSA ECDSA ED25519 # service ssh restart
问题2:PowerShell远程连接ssh报错“Permission denied(publickey)”
问题解释:因为新版的SSH-2默认使用秘钥认证登录,所以需要钥匙才行
解决方案:可参考"Windows 10内置Ubuntu子系统安装SSH服务"
# vi /etc/ssh/sshd_config PasswordAuthentication on //改成 PasswordAuthentication yes # service ssh restart
版权声明:本文由“憨小猪”发布,如需转载请注明出处。