[Linux] Check remote port connection

It may happen that you're working on a server with a user that has very limited capabilities. Sometimes you have no access to telnet:

telnet host port


nmap -A host -p port

curl - it will complain that it did not receive data, meaning that it connected successfully:

curl http://host:port


nc host port

 or whatever other tool you like to use. So what to do? Well maybe, you have access to bash:

cat < /dev/tcp/host/port

but I find this method not very reliable. Instead you might have access to Python as well:

import socket

No comments:

Post a comment

With great power comes great responsibility