For the past few days I’ve been troubleshooting agonizingly slow SSH login performance into cygwinized Windows Server 2008r2 clients. And when I say slow, I mean 1+ minutes to bring up a prompt.
I finally narrowed the problem down to the machines having UNC paths in the system’s %PATH% environment variable (and thus inherited by the cygwin environment). Despite the UNCs being valid and accessible, cygwin was not happy about having them present. Removing them from the system %PATH% and bouncing the CYGWIN sshd service reduce the login times down to a more modest 3-4 seconds.
I’m unsure if this is isolated to the version of cygwin being used, Windows Server 2008r2’s interaction with UNC paths, or some combination thereof but the solution was simple once I figured it out.