Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Original netcat doesn't support ssl. ncat from nmap project does.
In linux, we can connect multiple commands with pipeline.
Is it possible to combine netcat and openssl to create a ncat?

share|improve this question
up vote 1 down vote accepted

No doubt you can do it with stunnel, a generic program that makes TCP connections such that they're done with SSL.

It's generic, so it make POP go through SSL too, making Secure POP, or it could do HTTP.

share|improve this answer

Use stunnel+netcat to connect

$ grep smtp /etc/services
smtp            25/tcp          mail
ssmtp           465/tcp         smtps           # SMTP over SSL

$ cat stunnel.conf
client = yes
accept = localhost:smtp
connect =

$ sudo stunnel4 stunnel.conf

$ nc -C localhost smtp
220 ESMTP s7sm6983451paz.7
ehlo at your service, []
250-SIZE 35882577
221 2.0.0 closing connection s7sm6983451paz.7
share|improve this answer

Socat is netcat on steroids. If you can use socat, see Securing Traffic Between two Socat Instances Using SSL

share|improve this answer

You must log in to answer this question.

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