I encountered a little issue while using the nc utility on Mac OS X, a utility i often use as a quick and dirty solution to check if a port is open and what version the daem
I believe you are looking for the -G option. From the man pages:
-G
-G conntimeout TCP connection timeout in seconds.
-w is used to set the timeout after connection. -G option is used to set the timeout before connection. This should give you what you want
-w
nc -n -G 2 -v xxx.xxx.xxx.xxx 22