简体   繁体   中英

SSH connection to git not working anymore on WSL2

I'm using a windows 11 OS and was previously using SSH just fine to clone, pull and push my code to github using WSL2 running Ubuntu 22.0, however, I dont know what exactly happened (I have done this before, and it didn't bring any problems), I had issues installing mongo db so I used Oracle Virtual Box running Ubuntu 18.04, generated keys to get the code from my github and clone my project. After that, I noticed I couldn't push code to github on WSL2. After the connection problems i went back to my VM to finish some work but it also failed to connect, the behavior was the same as WSL. Now I'm using SSH in some weird way, this i what I have to do to clone something for my repo now, ssh://git@ssh.github.com:443/Mtsumi/AirBnB_clone_v2.git. Please help.

mtsumi@Aly:~$ ssh -vT git@github.com OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 15 Mar 2022 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Connecting to github.com [140.82.121.3] port 22. debug1: connect to address 140.82.121.3 port 22: Connection timed out ssh: connect to host github.com port 22: Connection timed out

I follow a Odin Project whenever i do ssh stuff with github and it has worked several times, Nothing new, so i dont understand

anyone who might have a similar issue should just try another.network, if your keys are okay, config file is okay and you still have issues with SSH timing out, just try another wifi or mobile hotspot. I think my ISP blocked my SSH port, that's why i had issues but I fixed it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM