I was addicted to setting up an SSH server on Ubuntu 20.04, which is WSL2, so I will introduce the solution.
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))
No way systemctl cannot be used Was killed
Recommended Posts