1

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
10
  • What happens on Windows if you try to SSH during these 5 minutes after sleep?
    – harrymc
    Commented Jun 23, 2023 at 9:10
  • I get: port 22: Connection timed out error
    – user1744655
    Commented Jun 23, 2023 at 9:21
  • Which SSH software do you use on Windows? If it has detailed tracing, the log could help.
    – harrymc
    Commented Jun 23, 2023 at 9:42
  • I think its OpenSSH. Saw this: C:\Windows\System32\OpenSSH\ssh.exe
    – user1744655
    Commented Jun 23, 2023 at 10:17
  • This is the Windows adaptation of OpenSSH. See the article Enable Debugging Mode in SSH to Troubleshoot Connectivity Issues. It might be enough to start with ssh -v. (Add to your comment @harrymc for me to be notified.)
    – harrymc
    Commented Jun 23, 2023 at 10:28

1 Answer 1

0

You may be running into the problem described in the Github bug-report from April
ZeroTier having issues reconnecting after Windows sleep/hibernate #1958:

ZeroTier One is having issues reconnecting to networks following a system suspend (sleep or hibernate). When the system is first restored, attempting to connect to any machine on a ZeroTier network does not work. Pinging the machine results in a timeout (console output below).

It seems like your version is behaving better, as it manages still to reconnect after 5 minutes.

Note that the only workaround in that big-report was to "install ZeroTier 1.10.1 where this issue almost doesn't exist". However, this seems to mean that the problem still exists in this version, although it has a lesser effect.

I suggest to put up a new bug-report with the problem, as it doesn't seem to be a problem that you can solve yourself, beside looking for an earlier version that doesn't have it.

1
  • Thanks. Will create a bug report for that. This was a particularly tricky issue to investage
    – user1744655
    Commented Jun 24, 2023 at 20:05

You must log in to answer this question.