Check what service is running on a specific tcp/udp port

kess

I'm looking for a command-line utility that allows me to check what service (eg: http/ftp/ssh) is running on a specific port of a remote machine.

An example of how I imagine a program like this would operate:

kess@KG-PC:~$ portcheck google.com:80
Port 80 of google.com is running a(n) "http" server
Romeo Ninov

The simplest way to do such recognition is by establish connection to this port and grab the banner. Banner (usually) can tell you if this is for example Apache httpd, openssh and so on. The list of banners can be quite big. Also you can try some commands like GET / HTTP/1 to check if the service answer to them. For plain text command telnet can be enough. For encrypted (SSL/TLS) you may need to use openssl s_client.

AFAIK nmap can do such things so you can download the source and check how is done there.

If you want to use just a tool you can test:

nmap -A google.com -p 80

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Ansible: Check if service is listening on a specific port

How to check whether a service in running on particular port using adb

Check if a service is already running

closing a port in a running kubernetes service

Service running on a specific port works from any website... How to disable that?

minikube expose service on specific port

Can I Use Telnet to Verify What Kind of Service a Port on a Different Host Is Running?

what is the relationship between EXPOSE in the dockerfile and TARGETPORT in the service YAML and actual running port in the Pod?

What is the "port" used for for a Kubernetes Service

Port 1199 (DMIDI) - What is this service?

How to check if a service is running on Android?

Why is port not open? (Not UFW; Service is running)

Kill tomcat service running on any port, Windows

Finding a Server in the network running on a specific port

Check if a specific file with a specific name is running?

Stack service expose port on specific interface?

How to check if a specific port is open for OUTPUT mode?

check if specific device is connected to COM Port

How to find out what is running on localhost port

What Port is Squid Running on in OS X/BSD

Kill what ever is running on port 8080

What is the master process running on port 465?

Kubernetes - what does <unset> mean in port in a service?

What service uses UDP port 495?

Java: Check what processes are bound to a port?

Check if service is Enabled, Disabled, Running or Stopped

How to check if a particular service is running on Ubuntu

Python code to check if service is running or not.?

How to check if a service is already running or not in android?

TOP Ranking

HotTag

Archive