DEV Community

Cover image for How to check which port are open for connection on remote server
özkan pakdil
özkan pakdil

Posted on Originally published at ozkanpakdil.github.io on

How to check which port are open for connection on remote server

Today I needed to check which ports are open on a remote server to ensure that the services I need are running and accessible. Here are a few ways to check which ports are open on a remote server:

Telnet

Telnet is a command-line tool that can be used to check if a port is open on a remote server. You can use the following command to check if a port is open:

telnet <hostname> <port>

⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026 ⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026

For example, to check if port 80 is open on example.com, you can run:

telnet example.com 80

⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026 ⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026

Powershell

If you are using Windows, you can use PowerShell to check if a port is open on a remote server. You can use the following command to check if a port is open:

Test-NetConnection -ComputerName <hostname> -Port <port>

⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026 ⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026

Curl

You can also use curl to check if a port is open on a remote server. You can use the following command to check if a port is open:

curl -v <hostname>:<port>

⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026 ⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026

For example, to check if port 22 is open on example.com, you can run:

curl -v -s -m 2 telnet://127.0.0.1:22 </dev/null

⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026 ⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026

wget

You can use wget to check if a port is open on a remote server. You can use the following command to check if a port is open:

wget -O /dev/null http://<hostname>:<port>

⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026 ⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026

nc

You can use nc (netcat) to check if a port is open on a remote server. You can use the following command to check if a port is open:

nc -zv <hostname> <port>

⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026 ⚡ Match Highlights: ozkanpakdil/how to check which port are open for connection on remote server ch - Info Live Streaming 2026

my personal favorite is using nc or curl as it is simple and easy to use. And telnet can not be found on some systems. needs extra installation but curl is mostly available on all systems.

Top comments (0)