Centos를 사용하여 원격 포트에 연결할 수 있는지 확인하세요.

Centos를 사용하여 원격 포트에 연결할 수 있는지 확인하세요.

netcatDubian에서는 (일명 nc, )를 사용하여 ncat다음을 수행 할 수 있습니다.

michael@pi1:~ $ nc -zv 10.120.11.1 20 21 22 23 24
nc: connect to 10.120.11.1 port 20 (tcp) failed: Connection refused
Connection to 10.120.11.1 21 port [tcp/ftp] succeeded!
Connection to 10.120.11.1 22 port [tcp/ssh] succeeded!
Connection to 10.120.11.1 23 port [tcp/telnet] succeeded!
nc: connect to 10.120.11.1 port 24 (tcp) failed: Connection refused
michael@pi1:~ $

Dubian의 man nc는 다음과 같이 표시됩니다.

 -z      Specifies that nc should just scan for listening daemons, without sending any data to them.  It is an error to use this option in conjunction with the -l option.

Centos7에서는 원래 nc가 없어서 sudo yum install nmap-ncat.x86_64.

그러나 -z이 플래그는 지원되지 않습니다.

[michael@box1 ~]$ nc -zv 10.255.255.1 22
nc: invalid option -- 'z'
Ncat: Try `--help' or man(1) ncat for more information, usage options and help. QUITTING.
[michael@box1 ~]$

답변1

예, 또한 nc가 -z를 지원하지 않는 것으로 나타났습니다. 왜 버렸는지 궁금합니다. 이전 버전의 ncat을 설치하거나 nmap을 사용할 수 있습니다.

지도 nmap -sT -p <port>

관련 정보