When I use ssh
to connect to my win11 laptop wsl2 from my mac, I follow this tutorial https://github.com/ajithmoola/wsl-ssh-guide.
When I do ssh [username]@[ip address] -p 2222
, It turns out connection closed by [my ip address] port 2222
. I restart my wsl2 and try many times, this time I got WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
I delete .ssh/known_hosts
and .ssh/known_hosts.old
both my mac and win11 laptop , then everything went well.