Set up an SSH server on WSL2 Ubuntu 20.04

Introduction

I was addicted to setting up an SSH server on Ubuntu 20.04, which is WSL2, so I will introduce the solution.

What's wrong

Solutions

Ignore Troubleshooting and reinsert it.

$ sudo apt purge openssh-server
$ sudo apt install openssh-server

Let's start using service instead of systemctl

$ sudo service ssh start
 * Starting OpenBSD Secure Shell server sshd                                                                     [ OK ]

TCP port 22 opened successfully

$ sudo ss -autoSnp
Netid   State       Recv-Q   Send-Q      Local Address:Port       Peer Address:Port   Process
tcp     LISTEN      0        128               0.0.0.0:22              0.0.0.0:*       users:(("sshd",pid=2067,fd=3))
tcp     LISTEN      0        128                  [::]:22                 [::]:*       users:(("sshd",pid=2067,fd=4))

Finally

No way systemctl cannot be used Was killed

Recommended Posts

Set up an SSH server on WSL2 Ubuntu 20.04
Set up ansible-playbook on Ubuntu 20.04
[Ubuntu] Set up a Nukkit server
Set up a MineCraft Paper server on Ubuntu 20.04.1 LTS ② Update
Set up Metabase service on Windows Server 2012
ubuntu on wsl part 10
I built an Ubuntu environment on Windows 10 using WSL2.
Steps to set up a VNC server on CentOS 8.3
Build VNC Server on Ubuntu 20.04
Install Docker on Ubuntu Server 20.04
Set up Gitolite on CentOS 7
Install Java on WSL Ubuntu 18.04
Ruby installation on WSL2 + Ubuntu 20.04
Install Ubuntu Server 20.04 on Btrfs
Set up Django on Ubuntu 16.04 with PostgreSQL and Gunicorn on ECS
Elmer / Ice installation (Ubuntu on WSL)
Easily set up a Jenkins server on AWS using Bitnami's AMI
Install Ubuntu Server 20.04 in VirtualBox on Mac and connect with SSH
Install Docker on Ubuntu and set up remote connection using tls
ubuntu ssh
Set up ImpressPages 5.0 with LAMP on CentOS 7.3
Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04
Use cljstyle with Spacemacs on Ubuntu on WSL2
Set up Docker Registry locally on CentOS 7
Try putting Docker in ubuntu on WSL
Creating an SSL certificate using Let's Encrypt and setting up Nginx on Ubuntu 20
Try running ScalarDB on WSL Ubuntu (Environment Construction)
Gachi beginners set up containers on Kubernetes? Until···
Ssh login to the app server on heroku
Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions
Set up a CentOS virtual server with Vagrant
Eh !? Run Linux on Windows? I can do it! !! (I set WSL2 and put Ubuntu)
tmux on Ubuntu
Try running ScalarDB on WSL Ubuntu (Sample application creation)
Setting up the FreeBSD desktop environment on Ubuntu + qemu
How to install NVIDIA driver on Ubuntu ssh destination
Steps to set up Postfix and Dovecot on CentOS 8.3