I am not sure how to phrase this question well, but I noticed that connecting to a remote machine through ssh, my M2 Macbook Air can connect instantly after turning on from sleep. My Windows PC takes atleast 5 minutes or so until it is able to ssh.
Note that the internet on both the devices is working, and both devices have the permission to connect to the remote machine.
The specs of the machines:
- Windows PC: ROG Strix G17 with Ryzen 9 6900HX, RTX 3060 (140W), 16 GB DDR5 RAM, MediaTek Wi-Fi 6E MT7922 160MHz Wireless LAN Card
- Macbook Air: M2 chip, 16GB RAM
My Windows PC's OS is Windows 11. I also have WSL2 installed.
How do I diagnose this issue? I want to know what is causing this issue. I will add relevant terminal command outputs to the question.
Edit:
Got this as an output with the command: ssh -v
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
debug1: Reading configuration data C:\\Users\\*****/.ssh/config
debug1: C:\\Users\\*****/.ssh/config line 1: Applying options for *****
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to ***** [*****] port 22.
debug1: connect to address ***** port 22: Connection timed out
ssh: connect to host ***** port 22: Connection timed out
Output of ssh -vvv:
debug3: send packet: type 1
debug3: send - WSASend() ERROR:10054, io:000001DF88072050
client_loop: send disconnect: Connection reset
debug3: Successfully set console output code page from 65001 to 65001
debug3: Successfully set console input code page from 65001 to 850
PS C:\Users\****> ssh -vvv ****@********
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
debug3: lookup_sid: local user name is same as machine name
debug1: Reading configuration data C:\\Users\\****/.ssh/config
debug1: C:\\Users\\****/.ssh/config line 1: Applying options for ****
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname **** is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> 'C:\\Users\\****/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> 'C:\\Users\\****/.ssh/known_hosts2'
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug3: ssh_connect_direct: entering
debug1: Connecting to **** [****] port 22.
debug3: finish_connect - ERROR: async io completed with error: 10060, io:0000028C5FB15B10
debug1: connect to address ***** port 22: Connection timed out
ssh: connect to host ****** port 22: Connection timed out
ssh -v
. (Add to your comment@harrymc
for me to be notified.)