I have an odd case where a vulnerability scan is reporting that sshd is vulnerable because of TLS. I didn't think SSH used TLS, so can someone help me explain why "openssl s_client -connect hostname:22 -tls1" shows SSH is accepting TLS connections?

For example:

$ openssl s_client -connect myhost:22 -tls1
140300455982912:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:332:
no peer certificate available
No client certificate CA names sent
SSL handshake has read 5 bytes and written 104 bytes
Verification: OK
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
    Protocol  : TLSv1
    Cipher    : 0000
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1598564402
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: no

Thanks in advance!

  • The more I look at it, the more it looks like the -tls1 flag causes additional output, but it doesn't look like the connection is actually established. If I remove the -tls1 flag, nothing is reported... whereas, if I specify the same command without the flag and point it to a webserver, I get a lot more TLS connection information indicating a successful connection.
    – mikem
    Aug 27, 2020 at 22:12
  • It's not the -tls1 flag. s_client was intended to be a test/debug tool and by default produces a lot of data about the session negotiation unless you use -quiet. In the case you posted, if you know how to read it, this data clearly indicates the connection (handshake) failed, even without having the error message explicitly saying so. For a successful connection, except for the server cert or chain, you don't actually get many more items of data, but many of them are larger, some of them much larger, making the total larger. Aug 28, 2020 at 2:22

1 Answer 1


No, SSH does not use TLS. It uses its own protocol that provides encryption.

Note your second line of output:

140300455982912:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:332

That looks like a fatal error, so any additional output is probably debug-related.

  • 2
    Also New, (NONE), Cipher is (NONE) indicates that the TLS negotiation failed.
    – gowenfawr
    Aug 28, 2020 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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