0

I have two machines:

  • Windows 7 connected by ethernet to a router
  • NixOS laptop, connected wirelessly to same router

My issue is that sshing from Windows to NixOS is extremely laggy. If I ping NixOS from Windows, I get times of about 100ms - 200ms. If I do the reverse- ping Windows from NixOS- I get times < 10ms.

The NixOS install is recent. Prior to this, I had Arch Linux, which did not suffer the same problem. I don't recall any other changes.

Additionally, I can ssh to a remote server not on the LAN. SSHing from either Windows or NixOS to the remote server has no issues whatsoever with lag.

I have tried the following:

  • setting this option in sshd's config: UseDNS no
  • setting my nameserver to 8.8.8.8

However, these haven't helped (seems to be a lower-level issue than sshd)

My question: what do I need to do to stop SSH lagging?

  • Can you connect the laptop to a wired network? Just to exclude some factors... – davidbaumann May 2 '15 at 19:29
  • Unfortunately I only have one ethernet cable :(. Pinging NixOS from another windows laptop on the wireless network shows similarly slow replies (~ 100-200ms) – statusfailed May 2 '15 at 20:11
3

I found this thread, which suggests running the following command as root:

iw wlp2s0 set power_save off

I ran this on my NixOS machine. This turns off power saving for the wifi network device wlp2s0. If you have a differently-named device (like wlan0), you need to use that name instead.

SSH is now much more responsive, and ping times are also back down to < 5ms.

  • And is it faster now? – ott-- May 2 '15 at 20:47
  • er, yes. embarassed to have neglected that. I will edit the answer. – statusfailed May 2 '15 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.