Last active
January 27, 2021 05:03
-
-
Save MrCoder/4a50c4aa37a85bcde7d5a72894c1455d to your computer and use it in GitHub Desktop.
Test remote port with and without telnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash: It requires no other tools | |
# cat < /dev/tcp/host/port or cat < /dev/udp/host/port | |
$ cat < /dev/tcp/127.0.0.1/22 | |
SSH-2.0-OpenSSH_5.3 | |
# telnet: telnet host port | |
$ telnet 127.0.0.1 22 | |
# nc: nc -zv host port1 port2 or port3-port4 | |
$ nc -zv 127.0.0.1 22 | |
Connection to 127.0.0.1 22 port [tcp/ssh] succeeded! | |
# curl: curl host:port | |
$ curl localhost:22 | |
SSH-2.0-OpenSSH_5.3 | |
Protocol mismatch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment