Why does '~$ nc -z T43 1-1024' not produce any output although '~$ ping T43' is successful?
- by user43816
Why does '~$ nc -z T43 1-1024' not produce any output although '~$ ping T43' is successful?
'~$ nc -z -v T43 1-1024' prints 'Connection to T43 22 port [tcp/ssh] succeeded!' and 'nc: connect to T43 port 1000 (tcp) failed: Connection refused.'
'man nc': "PORT SCANNING: It may be useful to know which ports are open and running services on a target machine. The -z flag can be used to tell nc to report open ports, rather than initiate a connection. For example: '$ nc -z host.example.com 20-30'.