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.

Lexicon
  • 257
  • 1
  • 2
  • 10
  • 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 06 '13 at 15:34
  • possible duplicate of [Connecting to HTTPS with netcat (nc)](http://serverfault.com/questions/102032/connecting-to-https-with-netcat-nc) – Ciro Santilli OurBigBook.com Dec 09 '14 at 08:14

3 Answers3

18

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

mricon
  • 1,164
  • 7
  • 9
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.

DaveG
  • 1,107
  • 6
  • 13
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.

Jan Schejbal
  • 171
  • 3