Server Fault is a question and answer site for system and network administrators. 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

Perhaps some server can handle both non-secure and secure protocols. Is there known way to determine if existing TCP connection secure or not?

(I believe it is possible just monitor traffic and check if some text is readable, but maybe there is better or maybe more detailed suggestions?)

share|improve this question
up vote 4 down vote accepted

I am assuming that you are packet-sniffing...

If you have all the packets from the beginning of the connection, you should be able to see from the first few packets what type of upper-layer protocol is being used (ssh/https/sftp).

If it is a plain TLS encrypted data stream, then you should be able to see the TLS handshake where the client and server agree on what protocol to use and exchange public keys for use in the encryption... From then on you know it is ssl encrypted, or some other data.

Your average packet sniffer such as wireshark can normally decode these initial messages, but obviously not the encrypted content...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.