Test TCP connectivity with curl and Telnet
Test SSH port connection with curl and Telnet
In this example, SSH connection works because:
- We get the “Connected” status
- We see the SSH version prompt: SSH-2.0-OpenSSH_7.4
Connection Sucess:
greys@server:~ $ curl -v telnet://127.0.0.1:22
* About to connect() to 127.0.0.1 port 22 (#0)
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 22 (#0)
SSH-2.0-OpenSSH_7.4
^C Cunnection Failure:
greys@server:~ $ curl -v telnet://127.0.0.1:8080
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1...
* Connection refused
* Failed connect to 127.0.0.1:8080; Connection refused
* Closing connection 0
curl: (7) Failed connect to 127.0.0.1:8080; Connection refused Ref: https://www.unixtutorial.org/test-tcp-connectivity-with-curl/
