Derp. -n != -z. The check for ssh connections actually works now.