【WSL2笔记3】 win10子系统Ubuntu安装SSH服务

WSL2笔记1 win10子系统Ubuntu安装SSH服务

  • 1、安装Openssh-server
  • 2、修改配置
    • 2.1 查看SSH服务器配置内容
    • 2.2 创建自已的配置文件
    • 2.3 开机自启动
  • 3. WSL 虚拟机IP和设置SSH防火墙端口映射
    • 3.1 查看WSL虚拟机IP地址
    • 3.2 Windows中设置WSL SSH防火墙端口
  • 4、win10下连接WSL SSH
    • 4.1 SSH工具软件Termius

1、安装Openssh-server

sudo apt install openssh-server

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libwrap0 ncurses-term openssh-sftp-server ssh-import-id
Suggested packages:
  molly-guard monkeysphere ssh-askpass
The following NEW packages will be installed:
  libwrap0 ncurses-term openssh-server openssh-sftp-server ssh-import-id
0 upgraded, 5 newly installed, 0 to remove and 53 not upgraded.
Need to get 798 kB of archives.
After this operation, 6157 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 openssh-sftp-server amd64 1:8.9p1-3ubuntu0.1 [38.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 libwrap0 amd64 7.6.q-31build2 [47.9 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 openssh-server amd64 1:8.9p1-3ubuntu0.1 [434 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 ncurses-term all 6.3-2 [267 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 ssh-import-id all 5.11-0ubuntu1 [10.1 kB]
Fetched 798 kB in 4s (196 kB/s)
Preconfiguring packages ...
Selecting previously un

你可能感兴趣的:(Ubuntu,ubuntu,ssh,linux)