With netcat-openbsd 1.219-1ubuntu1
ubuntu@ubuntu-devel:~$ nc.openbsd -z 127.0.0.1 22 ubuntu@ubuntu-devel:~$
It prints nothing.
With netcat-openbsd 1.225-1ubuntu1
$ nc.openbsd -z 127.0.0.1 22 Connection to 127.0.0.1 22 port [tcp/ssh] succeeded! ubuntu@ubuntu-devel:~$
It prints info on stderr.
With netcat-openbsd 1.219-1ubuntu1
ubuntu@ ubuntu- devel:~ $ nc.openbsd -z 127.0.0.1 22 ubuntu- devel:~ $
ubuntu@
It prints nothing.
With netcat-openbsd 1.225-1ubuntu1
$ nc.openbsd -z 127.0.0.1 22 ubuntu- devel:~ $
Connection to 127.0.0.1 22 port [tcp/ssh] succeeded!
ubuntu@
It prints info on stderr.