Linux: How to scan remote host for open ports ?

Linux : How to find a remote port is opened or not ?

Helllo Team,

If you are trying to findout whether a remote server port is opened or closed, then there are so many ways. Here In this article I am posting on same using telnet and nc commands.

Using telnet

Telnet usually holds prompt, so to avoid that, we are using echo in front of the command.

> $ echo | telnet xxxxxx 22
Trying xxxxxx...
Connected to xxxxx.
Escape character is '^]'.
Connection closed by foreign host.

Using nc

with nc command, its direct.

> $ nc -z -v -u xxxxx 22
Connection to xxxx port 22 [udp/ssh] succeeded!

# -z: Just perform scans without sending any data to the respective service running on the given port.
# -v : Verbose
# -u: UDP packets, without this it will be default tcp.

Hope it helps. Thanks

Comments

Popular posts from this blog

grep: unknown device method

Uploading files to FTP/SFTP using CURL

How to find outgoing IP in Linux ?