openssh-server 配置

安装ssh服务

在Ubuntu20.04.1 LTS子系统安装openssh-server。在Ubuntu子系统中,执行一下命令:

1
2
sudo apt remove openssh-server
sudo apt install openssh-server

编辑远程登录 配置信息

修改/etc/ssh/sshd_config配置文件。

在Ubuntu子系统中,执行一下命令:

1
vim /etc/ssh/sshd_config

(1)修改Port和ListenAddress

(2)修改PermitRootLogin

(3)修改PasswordAuthentication

(4)重新启动ssh服务.在Ubuntu子系统中,执行一下命令

1
service ssh restart

======以上======