The Curious Case of Unexplained SSH Timeouts

Recently I’ve been doing some WordPress development for a client and had to set up an environment for developing it. I didn’t do any development with WordPress since 2009 so I assumed (rightly so) that there’s a sensible, modern setup for it.

I started by setting up VVV which was a bad idea for my use case. After a couple of initial commits a collegue pointed me to bedrock which has a really nice, opinionated stack for developing themes.

In the meantime I switched jobs and moved from the green fields of Mac OS to Arch Linux. I considered going with Mint, which I have on my desktop but don’t use for work, but a friend from Hackerspace Wrocław advertised Arch as the best thing that happened to him.

I crawled through installation like a child in the dark and mind you, I thought I knew pretty much about Linux after using it and making it usable for close to eight years. In earlier days I had an affair with fluxbox so this time around I thought that a 180 degree swith after coming from Mac OS would be nice. IRC people advertized i3wm so that’s what I got. It’s really nice.

But there’s a dark side to Arch and pretty much any Linux desktop setup that’s usually hidden to mere mortals - issues with everything. I knew what I was going into and I’m not discouraged by the lengthy and awesome wiki that Arch has so I don’t run any Gnome packages that make it a desktop environment and not a mere window manager.

But let’s go back to Vagrant and the issue that I had. The details are fleshed out in the GitHub issue I opened. In a nutshell:

  1. SSH servers have a UseDNS option that defaults to yes.
  2. Arch Linux does not properly advertise it’s hostname on the LAN. It’s a minimal distribution, so installing software that actually does it is on the user.
  3. SSH’ing into Vagrant silently timeouts because it tries to check the hostname.

Details on how to fix it on Arch are in the linked comment. The most problematic thing about this was that SSH did not produce anything sensible and the issue itself is an iterplay of my incomplete setup and an SSH option that’s pretty much useless.

The thing that bums me most about this is that I lost a considerable ammount of time on trying to figure this out and that it’s been discussed for about 5 years and its’nt fixed yet.