11

I am doing some trouble shooting on an application that listens on tcp 443. This particular application talks via SSL. I wanted to connect to it with netcat. Is this possible?

Note: I'm not asking if netcat can encrypt its traffic.

2
  • 2
    Yes, netcat will be able to connect to it but that's it. You won't see any traffic because your client cannot send the initial SSL client setup. Is your goal to see if the TCP port is listening for connections?
    – Bort
    Feb 6, 2013 at 15:34
  • possible duplicate of Connecting to HTTPS with netcat (nc) Dec 9, 2014 at 8:14

3 Answers 3

18

You should use openssl s_client -connect server:port to debug applications over SSL connections.

2
  • openssl can do TLS that way too with -starttls <protocol>
    – fuero
    Feb 6, 2013 at 16:48
  • Unfortunately openssl s_client doesn't support IPv6. If that's important you can use ncat (part of nmap). Feb 6, 2013 at 16:59
2

You probably want to make use of the openssl s_client -connect command.

However it looks like this doesn't accept piped input as you might use with netcat.

If the application is just an HTTP server then you can use standard terminal entry to perform your session.

1

netcat doesn't support SSL. You can still use it to test whether you can establish a TCP connection, but not much more. Aside from the already suggested openssl s_client, you can use ncat (from nmap) or socat. ncat is very similar in usage to netcat, socat has a different syntax and is much more powerful, but should be able to do the same job.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .