Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.