ubuntu 子系统安装

1 安卓windows 应用商店 ubuntu18

2 配置源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.old

vim /etc/apt/sources.list

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

3 设置SSh

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

sudo vim /etc/ssh/sshd_config

内容

Port 8022

ListenAddress 0.0.0.0

PermitRootLogin yes

StrictModes yes

PasswordAuthentication yes

sudo service ssh restart

错误处理

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
 * 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

生成两种类型的key

sudo ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_ecdsa_key

sudo sh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key

猜你喜欢

转载自blog.csdn.net/csdn9990/article/details/111504604
今日推荐